diff options
| author | 宁岑 | 2026-09-08 17:37:45 +0800 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-09-14 14:08:28 +0200 |
| commit | 02f8b5593a15cdec8558256e6f40a0c7fb5862d6 (patch) | |
| tree | 708fb1c2cd05343f0b9008f733ad8ea7674df092 /tests/TestScripts/ConfigureTestsCommon.py | |
| parent | 889700e9799becb812ebb2c0fcf3b888f975e0ea (diff) | |
| download | catch3-02f8b5593a15cdec8558256e6f40a0c7fb5862d6.tar.gz | |
Pass the parent toolchain to CMake configuration tests
Diffstat (limited to 'tests/TestScripts/ConfigureTestsCommon.py')
| -rw-r--r-- | tests/TestScripts/ConfigureTestsCommon.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/TestScripts/ConfigureTestsCommon.py b/tests/TestScripts/ConfigureTestsCommon.py index 66896a89..0af4c1f6 100644 --- a/tests/TestScripts/ConfigureTestsCommon.py +++ b/tests/TestScripts/ConfigureTestsCommon.py @@ -18,6 +18,10 @@ def configure_and_build(source_path: str, project_path: str, options: List[Tuple '-S{}'.format(source_path), '-DCMAKE_BUILD_TYPE=Debug', '-DCATCH_DEVELOPMENT_BUILD=ON'] + toolchain_file = os.environ.get('CMAKE_TOOLCHAIN_FILE') + if toolchain_file: + # CMake only reads this environment variable itself since 3.21. + base_configure_cmd.append('-DCMAKE_TOOLCHAIN_FILE={}'.format(toolchain_file)) for option, value in options: base_configure_cmd.append('-D{}={}'.format(option, value)) try: |