conditionals3.py 705 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/python
  2. # Copyright 2003 Vladimir Prus
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. # Test that conditional properties work, even if property is free, and value
  6. # includes a colon.
  7. import BoostBuild
  8. t = BoostBuild.Tester(use_test_config=False)
  9. t.write("jamroot.jam", """
  10. exe hello : hello.cpp : <variant>debug:<define>"CLASS=Foo::Bar" ;
  11. """)
  12. t.write("hello.cpp", """
  13. namespace Foo { class Bar { } ; }
  14. int main()
  15. {
  16. CLASS c;
  17. c; // Disables the unused variable warning.
  18. }
  19. """)
  20. t.run_build_system(stdout=None, stderr=None)
  21. t.expect_addition("bin/$toolset/debug*/hello.exe")
  22. t.cleanup()