2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-09 23:12:23 +00:00
Files
build/test/feature_force_include.py
github-actions[bot] def908ed01 [Backport version/4.10.0] python3 shebang (#266)
* python3 shebang

(cherry picked from commit 9f0d565b06482a90b59d07ef9e7b9aadd698926c)

* CI: execute python scripts via shebang

(cherry picked from commit cf36b637abe2125cf6895bec593b4cbcf71ae570)

---------

Co-authored-by: Nikita Kniazev <nok.raven@gmail.com>
2023-04-17 14:23:50 -05:00

42 lines
865 B
Python

#!/usr/bin/env python3
# Copyright 2020 Nikita Kniazev
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.bfgroup.xyz/b2/LICENSE.txt)
# Tests the force-include feature
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
t.write("Jamroot.jam", """
obj test-cpp : test.cpp : <force-include>one.h <force-include>two.h ;
obj test-c : test.c : <force-include>one.h <force-include>two.h ;
""")
for name in ("test.cpp", "test.c"):
t.write(name, """
#ifndef ONE
#error Cannot compile without ONE
#endif
#ifndef TWO
#error Cannot compile without TWO
#endif
""")
t.write("one.h", """
#define ONE
""")
t.write("two.h", """
#define TWO
""")
t.run_build_system()
t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
t.expect_addition("bin/$toolset/debug*/test-c.obj")
t.cleanup()