project_test4.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. import BoostBuild
  7. t = BoostBuild.Tester(translate_suffixes=0)
  8. t.set_tree("project-test4")
  9. t.run_build_system()
  10. t.expect_addition("bin/$toolset/debug*/a.obj")
  11. t.expect_content("bin/$toolset/debug*/a.obj",
  12. """$toolset/debug*/include-everything*
  13. a.cpp
  14. """)
  15. t.expect_addition("bin/$toolset/debug*/a.exe")
  16. t.expect_content("bin/$toolset/debug*/a.exe",
  17. "$toolset/debug*/include-everything*\n" +
  18. "bin/$toolset/debug*/a.obj lib/bin/$toolset/debug/optimization-speed*/b.obj\n"
  19. )
  20. t.expect_addition("lib/bin/$toolset/debug/optimization-speed*/b.obj")
  21. t.expect_content("lib/bin/$toolset/debug/optimization-speed*/b.obj",
  22. """$toolset/debug/include-everything/optimization-speed*
  23. lib/b.cpp
  24. """)
  25. t.expect_addition("bin/$toolset/debug*/b.exe")
  26. t.expect_content("bin/$toolset/debug*/b.exe",
  27. "$toolset/debug/define-MACROS/include-everything*\n" +
  28. "bin/$toolset/debug*/a.obj\n"
  29. )
  30. t.copy("lib/jamfile3.jam", "lib/jamfile.jam")
  31. # Link-compatibility check for rtti is disabled...
  32. #t.run_build_system(status=None)
  33. #import string
  34. #t.fail_test(t.stdout().find(
  35. #"""warning: targets produced from b.obj are link incompatible
  36. #warning: with main target a.exe""") !=-0)
  37. # Test that if we specified composite property in target reference, everything
  38. # works OK.
  39. t.copy("lib/jamfile1.jam", "lib/jamfile.jam")
  40. t.copy("jamfile5.jam", "jamfile.jam")
  41. t.run_build_system()
  42. t.expect_addition("lib/bin/$toolset/release*/b.obj")
  43. t.expect_content("bin/$toolset/debug*/a.exe",
  44. "$toolset/debug/include-everything*\n" +
  45. "bin/$toolset/debug*/a.obj lib/bin/$toolset/release*/b.obj\n"
  46. )
  47. t.cleanup()