diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/tools/build/test/remove_requirement.py | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/tools/build/test/remove_requirement.py')
-rw-r--r-- | src/boost/tools/build/test/remove_requirement.py | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/boost/tools/build/test/remove_requirement.py b/src/boost/tools/build/test/remove_requirement.py new file mode 100644 index 000000000..9655ad3ae --- /dev/null +++ b/src/boost/tools/build/test/remove_requirement.py @@ -0,0 +1,91 @@ +#!/usr/bin/python + +# Copyright (C) Vladimir Prus 2006. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import BoostBuild + +t = BoostBuild.Tester(use_test_config=False) + + +t.write("jamroot.jam", """ +project : requirements <threading>multi <variant>debug:<link>static ; +# Force link to be relevant +project : requirements <link>shared:<define>TEST_DLL ; + +build-project sub ; +build-project sub2 ; +build-project sub3 ; +build-project sub4 ; +""") + +t.write("sub/jamfile.jam", """ +exe hello : hello.cpp : -<threading>multi ; +""") + +t.write("sub/hello.cpp", """ +int main() {} +""") + +t.write("sub2/jamfile.jam", """ +project : requirements -<threading>multi ; +exe hello : hello.cpp ; +""") + +t.write("sub2/hello.cpp", """ +int main() {} +""") + +t.write("sub3/hello.cpp", """ +int main() {} +""") + +t.write("sub3/jamfile.jam", """ +exe hello : hello.cpp : "-<variant>debug:<link>static" ; +""") + +t.write("sub4/hello.cpp", """ +int main() {} +""") + +t.write("sub4/jamfile.jam", """ +project : requirements "-<variant>debug:<link>static" ; +exe hello : hello.cpp ; +""") + +t.run_build_system() + +t.expect_addition("sub/bin/$toolset/debug*/link-static*/hello.exe") +t.expect_addition("sub2/bin/$toolset/debug*/link-static*/hello.exe") +t.expect_addition("sub3/bin/$toolset/debug*/threading-multi*/hello.exe") +t.expect_addition("sub4/bin/$toolset/debug*/threading-multi*/hello.exe") + +t.rm(".") + +# Now test that path requirements can be removed as well. +t.write("jamroot.jam", """ +build-project sub ; +""") + +t.write("sub/jamfile.jam", """ +project : requirements <include>broken ; +exe hello : hello.cpp : -<include>broken ; +""") + +t.write("sub/hello.cpp", """ +#include "math.h" +int main() {} +""") + +t.write("sub/broken/math.h", """ +Broken +""") + + +t.run_build_system() + +t.expect_addition("sub/bin/$toolset/debug*/hello.exe") + +t.cleanup() |