summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Ninja/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake9
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()