]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/project_dependencies.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / project_dependencies.py
1 #!/usr/bin/python
2
3 # Copyright 2003 Dave Abrahams
4 # Copyright 2002, 2003, 2004 Vladimir Prus
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 # Test that we can specify a dependency property in project requirements, and
9 # that it will not cause every main target in the project to be generated in its
10 # own subdirectory.
11
12 # The whole test is somewhat moot now.
13
14 import BoostBuild
15
16 t = BoostBuild.Tester(use_test_config=False)
17
18 t.write("jamroot.jam", "build-project src ;")
19
20 t.write("lib/jamfile.jam", "lib lib1 : lib1.cpp ;")
21
22 t.write("lib/lib1.cpp", """
23 #ifdef _WIN32
24 __declspec(dllexport)
25 #endif
26 void foo() {}\n
27 """)
28
29 t.write("src/jamfile.jam", """
30 project : requirements <library>../lib//lib1 ;
31 exe a : a.cpp ;
32 exe b : b.cpp ;
33 """)
34
35 t.write("src/a.cpp", """
36 #ifdef _WIN32
37 __declspec(dllimport)
38 #endif
39 void foo();
40 int main() { foo(); }
41 """)
42
43 t.copy("src/a.cpp", "src/b.cpp")
44
45 t.run_build_system()
46
47 # Test that there is no "main-target-a" part.
48 # t.expect_addition("src/bin/$toolset/debug/a.exe")
49 # t.expect_addition("src/bin/$toolset/debug/b.exe")
50
51 t.cleanup()