/[escript]/branches/ROBW_XPLATFORM/finley/src/SConscript
ViewVC logotype

Annotation of /branches/ROBW_XPLATFORM/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 648 - (hide annotations)
Fri Mar 24 06:04:57 2006 UTC (17 years ago) by robwdcock
File size: 2062 byte(s)
+Finely unit tests now running in build system

All C++ tests run and compile on Altix, I expect the same result for Linux so you may not see another log message for that.


1 jgs 182 Import('*')
2    
3 robwdcock 623 local_env=env.Copy()
4    
5     src_dir = local_env.Dir('.').srcnode().abspath
6    
7 jgs 182 import os
8 robwdcock 623 filenames = os.listdir(src_dir)
9     sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10     headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11 jgs 182
12 robwdcock 623 # Filter unused sources
13     sources.remove('ElementFile_borrowLocalVolume.c') # FIXME: Should this file be removed?
14 jgs 277
15 robwdcock 623 # finleycpp has additional source in the CPPAdapter sub-directory. Append these to the list
16     cppadapter_filenames = os.listdir(src_dir+'/CPPAdapter');
17     sources += ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
18     cppadapter_headers = ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.h']]
19 jgs 182
20 robwdcock 623 if mkl_libs:
21     local_env.Append(CPPDEFINES=['MKL',])
22     if scsl_libs:
23     local_env.Append(CPPDEFINES=['SCSL',])
24     if umf_libs:
25     local_env.Append(CPPDEFINES=['UMFPACK',])
26     if papi_libs:
27     local_env.Append(CPPDEFINES=['PAPI',])
28 jgs 277
29 robwdcock 623 lib_name = 'finleycpp'
30 jgs 277
31 robwdcock 648 local_env.Append(LIBS = [boost_lib, python_lib, sys_libs, 'esysUtils', 'escriptcpp', 'paso'])
32 jgs 190
33 robwdcock 623 lib = local_env.SharedLibrary(lib_name, sources)
34 jgs 481
35 robwdcock 623 include_path = Dir(lib_name, incinstall)
36     cppadapter_include_path = Dir('CppAdapter', include_path)
37 jgs 182
38 robwdcock 623 local_env.Install(include_path, headers )
39     local_env.Install(cppadapter_include_path, cppadapter_headers )
40     local_env.Install(libinstall, lib)
41 jgs 277
42 robwdcock 648 # Call the unit tests SConscript
43     # export the lib target since tests will depend on it
44     # the lib target is a list of file nodes (why? win32 produces more than one output file: .lib, .dll, .pdb)
45     # FIXME: This list handling produces the desired result but can this be done directly with scons File nodes?
46 jgs 277
47 robwdcock 648 dep_lib = [libinstall+'/'+str(x) for x in lib]
48     Export('dep_lib')
49    
50     local_env.SConscript(dirs = ['#/finley/test'], build_dir='#/build/$PLATFORM/finley/test', duplicate=0)
51    
52    
53    
54 robwdcock 623 # FIXME: old stuff
55 jgs 182
56 robwdcock 623 # 'dl',
57     # 'util'] \
58     # + solver_libs \
59     # + papi_libs
60 jgs 182
61 jgs 277
62 robwdcock 623 #Depends(finley_lib, esysUtils_lib)
63     #Depends(finley_lib, escript_lib)
64     #Depends(finley_lib, paso_lib)
65 jgs 277

  ViewVC Help
Powered by ViewVC 1.1.26