diff options
author | Brad King <brad.king@kitware.com> | 2023-12-08 13:38:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-12-08 14:04:44 (GMT) |
commit | 101ac06b2874b451e167f19d55fc0a8b684d7b44 (patch) | |
tree | 4a2b5ec532e7a320a970c0ef9df5156f6d47e134 /Tests/RunCMake/Ninja | |
parent | 2d60f5c7a67fb7d0ddc32d2332ea098bce81ea4c (diff) | |
download | CMake-101ac06b2874b451e167f19d55fc0a8b684d7b44.zip CMake-101ac06b2874b451e167f19d55fc0a8b684d7b44.tar.gz CMake-101ac06b2874b451e167f19d55fc0a8b684d7b44.tar.bz2 |
Tests: Update for changes to upstream ninja development version
Account for:
* commit `8f47d5aa33` (Remove `-w dupbuild` completely, always error
on duplicate edges, 2023-11-29)
* commit `4d98903d4c` (Improve misleading error message when an output
is defined multiple times, 2023-12-06)
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 69f2587..42ab1d8 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -347,6 +347,9 @@ if("${ninja_version}" VERSION_LESS 1.6) message(WARNING "Ninja is too old; skipping rest of test.") return() endif() +if("${ninja_version}" VERSION_LESS 1.12) + set(maybe_w_dupbuild_err -w dupbuild=err) +endif() set(ninja_output_path_prefixes "sub") if(NOT CMAKE_C_COMPILER_ID STREQUAL "OrangeC") @@ -364,14 +367,14 @@ endforeach(ninja_output_path_prefix) function (run_PreventTargetAliasesDupBuildRule) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PreventTargetAliasesDupBuildRule-build) run_cmake(PreventTargetAliasesDupBuildRule) - run_ninja("${RunCMake_TEST_BINARY_DIR}" -w dupbuild=err) + run_ninja("${RunCMake_TEST_BINARY_DIR}" ${maybe_w_dupbuild_err}) endfunction () run_PreventTargetAliasesDupBuildRule() function (run_PreventConfigureFileDupBuildRule) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PreventConfigureFileDupBuildRule-build) run_cmake(PreventConfigureFileDupBuildRule) - run_ninja("${RunCMake_TEST_BINARY_DIR}" -w dupbuild=err) + run_ninja("${RunCMake_TEST_BINARY_DIR}" ${maybe_w_dupbuild_err}) endfunction() run_PreventConfigureFileDupBuildRule() @@ -380,7 +383,7 @@ function (run_ChangeBuildType) set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug") run_cmake(ChangeBuildType) unset(RunCMake_TEST_OPTIONS) - run_ninja("${RunCMake_TEST_BINARY_DIR}" -w dupbuild=err) + run_ninja("${RunCMake_TEST_BINARY_DIR}" ${maybe_w_dupbuild_err}) endfunction() run_ChangeBuildType() |