dependency_property.py 1013 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. # Regression test: virtual targets with different dependency properties were
  6. # considered different by 'virtual-target.register', but the code which
  7. # determined the actual target paths ignored dependency properties so both
  8. # targets ended up being in the same location.
  9. #
  10. # This test has flip-flopped several times between passing and failing.
  11. # Currently, the library is only considered relevant for linking and thus
  12. # does not cause a conflict. SJW 20180115
  13. import BoostBuild
  14. t = BoostBuild.Tester()
  15. t.write("jamroot.jam", """\
  16. lib foo : foo.cpp ;
  17. exe hello : hello.cpp ;
  18. exe hello2 : hello.cpp : <library>foo ;
  19. """)
  20. t.write("hello.cpp", "int main() {}\n")
  21. t.write("foo.cpp", """\
  22. #ifdef _WIN32
  23. __declspec(dllexport)
  24. #endif
  25. void foo() {}
  26. """)
  27. t.run_build_system(["--no-error-backtrace"], status=0)
  28. t.cleanup()