ViewVC logotype

Annotation of /trunk/escript/test/SConscript

Parent Directory Parent Directory | Revision Log Revision Log

Revision 666 - (hide annotations)
Fri Mar 24 11:29:40 2006 UTC (13 years, 11 months ago) by robwdcock
Original Path: branches/ROBW_XPLATFORM/escript/test/SConscript
File size: 1047 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 638 Import('*')
3     program_name = 'escript_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, 'esysUtils', 'CppUnitTest', sys_libs])
15     local_env.sharedLinkHack(['escriptcpp',], libinstall, sources)
17 robwdcock 638 program = local_env.Program(program_name, sources)
19     Depends(program, dep_lib)
21     # TODO: Need to decide on how the library paths etc are going to be handled
22     # TODO: For now just install the program to the same location as the libraries so things can run at least
23     test_install = local_env.Install(libinstall, program)
25     #Add Unit Test to target alias
27     env.Alias('build_tests', test_install)
29     # run the tests - but only if test_targets are stale
30     local_env.RunUnitTest(program_name)
31     test_targets = os.path.splitext(program_name)[0]+'.passed'
32     Alias("run_tests", test_targets)
33 robwdcock 652
34 robwdcock 661 local_env.SConscript(dirs = ['#/escript/test/python'], build_dir='python', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26