2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00
Files
build/test/conditionals.py
Vladimir Prus 149a9f83ef Improve shared/static linking interface and
introduce separate <link-runtime> feature.
Allow to use the 'lib' rule to declare
libraries that should be searched for.

* builtin.jam: Remove 'shared' features. Introduce
   'link' and 'link-runtime'.
   (searched-lib-target): New class
   (searched-lib-generator): New generator.
   (lib-action): New class, derived from 'action'.
   Handles instances of 'searched-lib-target' in sources.
   Also, moves all libraries from sources to property value,
   so that we can repeat them twice in command line.
   (lib-generator): Generator which uses 'lib-action'.

* generators.jam: Allow empty list of sources everywhere.

* virtual-target.jam (file-target): Split into
   'abstract-file-target' and 'file-target'.
   (abstra
  (action.actualize-sources): New rule. Allows to
  handle the fact that some sources are special,
  and should not become $(>) in action body.


[SVN r16573]
2002-12-09 10:02:37 +00:00

29 lines
600 B
Python

#!/usr/bin/python
# Test conditional properties
from BoostBuild import Tester, List
import os
from string import strip
t = Tester()
t.write("project-root.jam", "import gcc ;")
t.write("a.cpp", """
#ifdef STATIC
int main() {}
#endif
""")
t.write("Jamfile", "exe a : a.cpp : <link>static:<define>STATIC ;")
t.run_build_system("link=static")
t.expect_addition("bin/gcc/debug/link-static/main-target-a/a")
t.write("Jamfile", """
project : requirements <link>static:<define>STATIC ;
exe a : a.cpp ;
""")
t.run_build_system("link=static")
t.expect_addition("bin/gcc/debug/link-static/a")
t.cleanup()