project_dependencies.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/python
  2. # Copyright 2003 Dave Abrahams
  3. # Copyright 2002, 2003, 2004 Vladimir Prus
  4. # Distributed under the Boost Software License, Version 1.0.
  5. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
  6. # Test that we can specify a dependency property in project requirements, and
  7. # that it will not cause every main target in the project to be generated in its
  8. # own subdirectory.
  9. # The whole test is somewhat moot now.
  10. import BoostBuild
  11. t = BoostBuild.Tester(use_test_config=False)
  12. t.write("jamroot.jam", "build-project src ;")
  13. t.write("lib/jamfile.jam", "lib lib1 : lib1.cpp ;")
  14. t.write("lib/lib1.cpp", """
  15. #ifdef _WIN32
  16. __declspec(dllexport)
  17. #endif
  18. void foo() {}\n
  19. """)
  20. t.write("src/jamfile.jam", """
  21. project : requirements <library>../lib//lib1 ;
  22. exe a : a.cpp ;
  23. exe b : b.cpp ;
  24. """)
  25. t.write("src/a.cpp", """
  26. #ifdef _WIN32
  27. __declspec(dllimport)
  28. #endif
  29. void foo();
  30. int main() { foo(); }
  31. """)
  32. t.copy("src/a.cpp", "src/b.cpp")
  33. t.run_build_system()
  34. # Test that there is no "main-target-a" part.
  35. # t.expect_addition("src/bin/$toolset/debug*/a.exe")
  36. # t.expect_addition("src/bin/$toolset/debug*/b.exe")
  37. t.cleanup()