-
Notifications
You must be signed in to change notification settings - Fork 20
/
Sconstruct
32 lines (24 loc) · 1.2 KB
/
Sconstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
print('\n =========== FOREFIRE ===========\n')
print(" ////// //////")
print(" // // ")
print(" ////// //////")
print(" // // ")
print(" // //\n")
print(" ==================================\n")
VariantDir('sconsbuild', 'src', duplicate=0)
env = Environment(CCFLAGS=['-O3'])
warnings = ARGUMENTS.get('w', 0)
if int(warnings):
env.Append(CCFLAGS = '-Wall')
#env.Program('./sconsbuild/bin/CommandShell', files, LIBS=['netcdf_c++', 'netcdf'])
#env.SharedLibrary('./sconsbuild/lib/ForeFire', files, LIBS=['netcdf_c++', 'netcdf'])
files = Glob('./build/*.cpp')
import os
netcdfHome = "/Users/filippi_j/soft/"
try:
netcdfHome = os.environ["NETCDF_HOME"]
except KeyError:
print ("!!!!!!!!! NETCDF_HOME environment variable not set, trying :" + netcdfHome+ "\n!!!!!!!!! if it does not compile, please export NETCDF_HOME=/path/to/include_and_lib_path )")
env.Append(CPPPATH=[netcdfHome+'/include/'],CCFLAGS=['-std=c++11','-Wall','-O3','-DNETCDF_NOT_LEGACY'], LIBPATH=[netcdfHome+'/lib/'])
env.SharedLibrary('./lib/ForeFire', Glob('*.cpp'), LIBS=['netcdf_c++4', 'netcdf'])
env.Program('./bin/CommandShell', Glob('*.cpp'), LIBS=['netcdf_c++4', 'netcdf'])