/[escript]/trunk/scons/esys_options.py
ViewVC logotype

Annotation of /trunk/scons/esys_options.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 584 - (hide annotations)
Thu Mar 9 23:03:38 2006 UTC (13 years, 9 months ago) by gross
File MIME type: text/x-python
File size: 3051 byte(s)
eigenvalues: compiles and passes tests on altix now
1 gross 426 # this code should be called by all esys13 scons builder and testing scripts
2     # it sets default values for relevant variables and overloads them with the
3 jgs 455 # standard gcc settings by importing gcc_options. If there is
4 gross 426 # a <hostname>_options file it is imported to set platform specific settings
5    
6 gross 425 # this is the general set up for the esys scons system:
7     libinstall = None
8     pyinstall = None
9 jgs 481 incinstall = None
10 gross 425 dodebug = 0
11    
12     # locations of libs etc used by mkl
13     mkl_path = ''
14     mkl_lib_path = ''
15     mkl_libs = []
16    
17     # locations of libs etc used by SCSL
18     scsl_path = ''
19     scsl_lib_path = ''
20     scsl_libs = []
21    
22     # locations of libs etc used by UMFPACK
23     umfpack_path = ''
24     umfpack_lib_path = ''
25     umfpack_libs = []
26    
27     # locations of include files for python
28     python_path = Dir('/usr/include')
29 jgs 486 python_lib_path = Dir('/usr/lib')
30 gross 584 python_lib = [ 'python2.3' ]
31 gross 425
32 gross 584 # locations of PAPI
33     papi_path = ''
34     papi_lib_path = ''
35     papi_libs = []
36    
37 gross 425 # locations of libraries for boost
38 gross 584 boost_path = '/usr/include'
39     boost_lib_path = '/usr/lib'
40     boost_lib = 'boost_python'
41 gross 425
42 jgs 486 # locations of doc building executables
43     doxygen_path = ''
44     epydoc_path = ''
45 jgs 487 epydoc_pythonpath = ''
46 jgs 486
47 gross 425 # names of c and c++ compilers to use
48     cc = 'gcc'
49     cxx = 'g++'
50    
51     # c flags to use
52     cc_flags = '-O0 -std=c99 -fpic -W -Wall -Wno-unknown-pragmas'
53     cc_flags_debug = '-g -O0 -std=c99 -fpic -W -Wall -Wno-unknown-pragmas'
54    
55     # c++ flags to use
56     cxx_flags = '-O0 -ansi -fpic -W -Wall -Wno-unknown-pragmas'
57     cxx_flags_debug = '-g -O0 -ansi -fpic -W -Wall -Wno-unknown-pragmas -DDOASSERT -DDOPROF'
58    
59     # static library archiver flags to use
60     ar_flags = 'crus'
61    
62     # system specific libraries to link with
63     sys_libs = []
64    
65     #==== end of setting options ===========================================
66 jgs 455
67 gross 425 import sys
68 jgs 455
69     # set esysroot
70 gross 425 options_dir = Dir(esysroot + '/scons')
71     if sys.path.count(str(options_dir))==0: sys.path.append(str(options_dir))
72 jgs 455
73 gross 425 #
74     # ensure correct versions of python and scons
75     EnsurePythonVersion(2,3)
76     EnsureSConsVersion(0,96)
77 jgs 455
78 gross 425 #
79     # retreive command-line arguments if any and overwrite settings in <hostname>_options
80     usegcc = 0
81     options = None
82     if ARGUMENTS.get('libinstall',0): libinstall = ARGUMENTS.get('libinstall',0)
83     if ARGUMENTS.get('pyinstall',0): pyinstall = ARGUMENTS.get('pyinstall',0)
84 jgs 481 if ARGUMENTS.get('incinstall',0): pyinstall = ARGUMENTS.get('incinstall',0)
85 gross 425 if ARGUMENTS.get('debug',0): dodebug = 1
86     if ARGUMENTS.get('options',0): options = ARGUMENTS.get('options',0)
87     if ARGUMENTS.get('usegcc',0): usegcc = 1
88     #
89     # try to import <hostname>_options
90     try:
91     exec "from gcc_options import *"
92     except ImportError:
93     pass
94 jgs 455
95 gross 425 #
96     # try to import <hostname>_options
97     if usegcc==0:
98     import socket
99 gross 550 hostname = socket.gethostname().split('.')[0]
100 gross 425 try:
101     exec "from "+hostname+"_options import *"
102     except ImportError:
103     pass
104 jgs 455
105     #
106 gross 425 # import additional options:
107     if options!=None:
108     exec "from " + options + " import *"
109 jgs 455
110 gross 425 #
111     # use debug options:
112     if dodebug==1:
113     cxx_flags=cxx_flags_debug
114 gross 427 cc_flags=cc_flags_debug
115 jgs 455
116 jgs 481 #
117     # export configuration variables
118 gross 584 #
119 gross 425 Export(["esysroot"])
120 jgs 457 Export(["libinstall"])
121 gross 584 Export(["incinstall"])
122 jgs 457 Export(["pyinstall"])

  ViewVC Help
Powered by ViewVC 1.1.26