mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
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]
29 lines
600 B
Python
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()
|