diff options
author | Brad King <brad.king@kitware.com> | 2021-06-03 12:18:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-03 12:18:32 (GMT) |
commit | 95faf9cb966d03899d6b3c3f6d8c48c46386fadd (patch) | |
tree | 94b06b681df3b8ac418d6da33b1b90d4f51e0657 /Tests/RunCMake/BuildDepends/RunCMakeTest.cmake | |
parent | 9d7ebb47ea30a75617778686ba187fa6d5e91f45 (diff) | |
parent | 9c33ff4dda643f8a93d55f9895e31dce9056134f (diff) | |
download | CMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.zip CMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.tar.gz CMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.tar.bz2 |
Merge branch 'master' into ci-sccache-consistent-builds
Diffstat (limited to 'Tests/RunCMake/BuildDepends/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/BuildDepends/RunCMakeTest.cmake | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index 6232634..0a80580 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -1,5 +1,22 @@ include(RunCMake) +if(RunCMake_GENERATOR MATCHES "Ninja") + # Detect ninja version so we know what tests can be supported. + execute_process( + COMMAND "${RunCMake_MAKE_PROGRAM}" --version + OUTPUT_VARIABLE ninja_out + ERROR_VARIABLE ninja_out + RESULT_VARIABLE ninja_res + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(ninja_res EQUAL 0 AND "x${ninja_out}" MATCHES "^x[0-9]+\\.[0-9]+") + set(ninja_version "${ninja_out}") + message(STATUS "ninja version: ${ninja_version}") + else() + message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}") + endif() +endif() + if(RunCMake_GENERATOR STREQUAL "Borland Makefiles" OR RunCMake_GENERATOR STREQUAL "Watcom WMake") set(fs_delay 3) @@ -155,7 +172,7 @@ if (RunCMake_GENERATOR MATCHES "Makefiles") run_cmake(CustomCommandDependencies-BadArgs) endif() -if(RunCMake_GENERATOR MATCHES "Make|Ninja") +if(RunCMake_GENERATOR MATCHES "Make|Ninja|Xcode") unset(run_BuildDepends_skip_step_3) run_BuildDepends(CustomCommandDepfile) set(run_BuildDepends_skip_step_3 1) @@ -164,3 +181,11 @@ endif() if(RunCMake_GENERATOR MATCHES "Make") run_BuildDepends(MakeDependencies) endif() + +if(RunCMake_GENERATOR MATCHES "^Visual Studio 9 " OR + (RunCMake_GENERATOR MATCHES "Ninja" AND ninja_version VERSION_LESS 1.7)) + # This build tool misses the dependency. + set(run_BuildDepends_skip_step_2 1) +endif() +run_BuildDepends(CustomCommandUnityBuild) +unset(run_BuildDepends_skip_step_2) |