ViewVC logotype

Annotation of /trunk/finley/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log

Revision 666 - (hide annotations)
Fri Mar 24 11:29:40 2006 UTC (14 years, 9 months ago) by robwdcock
Original Path: branches/ROBW_XPLATFORM/finley/test/SConscript
File size: 1099 byte(s)
+ Fix up python esys area:
  + libraries are named without lib prefix on posix platforms (python standard)
  + libraries are now installed into the pyinstall area (python standard)
  + symlinks removed, no longer required
  + LD_LIBRARY_PATH is now optional for PYTHON programs (still required for c++)
+ lib PREFIX removal NOTES:
  + removing the lib prefix is non-standard for the linker. As such we've created a
    custom function sharedLinkHack to specify the .so on the link command line
    (as opposed to using -l<archive> which will prepend the lib). This has a
    a small slight of hand for scons which was being to "helpful". Scons
    verifies that when creating a shared libray all objects specified are
    created shareable (e.g. ensure objects are compiler with -fPIC). Since
    we are linking a .so out of the blue we had to wrap it up in a File note
    and flag it as shared.
    Easily done, once you know how. Thankfully this is all wrapped
    up in a simple function (sharedLinkHack) that looks like ordinary scons so
    you will never know!

1 robwdcock 649 Import('*')
3     program_name = 'finley_UnitTest'
5     local_env=env.Copy()
8     src_dir = local_env.Dir('.').srcnode().abspath
10     import os
11     filenames = os.listdir(src_dir)
12     sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
14 robwdcock 666 local_env.Append(LIBS=[ python_lib, boost_lib, 'paso', 'esysUtils', 'CppUnitTest', scsl_libs, mkl_libs, umf_libs, sys_libs])
16     local_env.sharedLinkHack(['finleycpp', 'escriptcpp',], libinstall, sources)
19 robwdcock 649 program = local_env.Program(program_name, sources)
21     Depends(program, dep_lib)
23     # TODO: Need to decide on how the library paths etc are going to be handled
24     # TODO: For now just install the program to the same location as the libraries so things can run at least
25     test_install = local_env.Install(libinstall, program)
27     #Add Unit Test to target alias
29     env.Alias('build_tests', test_install)
31     # run the tests - but only if test_targets are stale
32     local_env.RunUnitTest(program_name)
33     test_targets = os.path.splitext(program_name)[0]+'.passed'
34     Alias("run_tests", test_targets)
36 robwdcock 661 local_env.SConscript(dirs = ['#/finley/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26