gcc_runtime.py 847 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/python
  2. # Copyright 2004 Vladimir Prus
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE.txt or copy at
  5. # https://www.bfgroup.xyz/b2/LICENSE.txt)
  6. # Tests that on gcc, we correctly report a problem when static runtime is
  7. # requested for building a shared library.
  8. import BoostBuild
  9. t = BoostBuild.Tester()
  10. t.write("jamroot.jam", "lib hello : hello.cpp ;")
  11. t.write("hello.cpp", "int main() {}\n")
  12. t.run_build_system(["runtime-link=static"])
  13. t.expect_output_lines("warning: On gcc, DLLs can not be built with "
  14. "'<runtime-link>static'.")
  15. t.expect_nothing_more()
  16. t.run_build_system(["link=static", "runtime-link=static"])
  17. t.expect_addition("bin/$toolset/debug*/link-static*/hello.obj")
  18. t.expect_addition("bin/$toolset/debug*/link-static*/hello.lib")
  19. t.expect_nothing_more()
  20. t.cleanup()