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

Annotation of /trunk/scons/esys_options.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 487 - (hide annotations)
Thu Feb 2 06:16:30 2006 UTC (13 years, 9 months ago) by jgs
File MIME type: text/x-python
File size: 2990 byte(s)
define epydoc PYTHONPATH setting
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 425 python_lib = Library('python2.3')
31    
32     # locations of libraries for boost
33 jgs 486 boost_path = Dir('/usr/include')
34     boost_lib_path = Dir('/usr/lib')
35 gross 425 boost_lib = Library('boost_python')
36    
37 jgs 486 # locations of doc building executables
38     doxygen_path = ''
39     epydoc_path = ''
40 jgs 487 epydoc_pythonpath = ''
41 jgs 486
42 gross 425 # names of c and c++ compilers to use
43     cc = 'gcc'
44     cxx = 'g++'
45    
46     # c flags to use
47     cc_flags = '-O0 -std=c99 -fpic -W -Wall -Wno-unknown-pragmas'
48     cc_flags_debug = '-g -O0 -std=c99 -fpic -W -Wall -Wno-unknown-pragmas'
49    
50     # c++ flags to use
51     cxx_flags = '-O0 -ansi -fpic -W -Wall -Wno-unknown-pragmas'
52     cxx_flags_debug = '-g -O0 -ansi -fpic -W -Wall -Wno-unknown-pragmas -DDOASSERT -DDOPROF'
53    
54     # static library archiver flags to use
55     ar_flags = 'crus'
56    
57     # system specific libraries to link with
58     sys_libs = []
59    
60     #==== end of setting options ===========================================
61 jgs 455
62 gross 425 import sys
63 jgs 455
64     # set esysroot
65 gross 425 options_dir = Dir(esysroot + '/scons')
66     if sys.path.count(str(options_dir))==0: sys.path.append(str(options_dir))
67 jgs 455
68 gross 425 #
69     # ensure correct versions of python and scons
70     EnsurePythonVersion(2,3)
71     EnsureSConsVersion(0,96)
72 jgs 455
73 gross 425 #
74     # retreive command-line arguments if any and overwrite settings in <hostname>_options
75     usegcc = 0
76     options = None
77     if ARGUMENTS.get('libinstall',0): libinstall = ARGUMENTS.get('libinstall',0)
78     if ARGUMENTS.get('pyinstall',0): pyinstall = ARGUMENTS.get('pyinstall',0)
79 jgs 481 if ARGUMENTS.get('incinstall',0): pyinstall = ARGUMENTS.get('incinstall',0)
80 gross 425 if ARGUMENTS.get('debug',0): dodebug = 1
81     if ARGUMENTS.get('options',0): options = ARGUMENTS.get('options',0)
82     if ARGUMENTS.get('usegcc',0): usegcc = 1
83 jgs 455
84 gross 425 #
85     # try to import <hostname>_options
86     try:
87     exec "from gcc_options import *"
88     except ImportError:
89     pass
90 jgs 455
91 gross 425 #
92     # try to import <hostname>_options
93     if usegcc==0:
94     import socket
95     hostname = socket.gethostname()
96     try:
97     exec "from "+hostname+"_options import *"
98     except ImportError:
99     pass
100 jgs 455
101     #
102 gross 425 # import additional options:
103     if options!=None:
104     exec "from " + options + " import *"
105 jgs 455
106 gross 425 #
107     # use debug options:
108     if dodebug==1:
109     cxx_flags=cxx_flags_debug
110 gross 427 cc_flags=cc_flags_debug
111 jgs 455
112 jgs 481 #
113     # export configuration variables
114 gross 425 Export(["esysroot"])
115 jgs 457 Export(["libinstall"])
116     Export(["pyinstall"])
117 jgs 481 Export(["incinstall"])

  ViewVC Help
Powered by ViewVC 1.1.26