summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/BuildDepends/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake34
1 files changed, 34 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 6c6d548d77..62326345e4 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -30,8 +30,17 @@ function(run_BuildDepends CASE)
include(${RunCMake_SOURCE_DIR}/${CASE}.step2.cmake OPTIONAL)
set(check_step 2)
run_cmake_command(${CASE}-build2 ${CMAKE_COMMAND} --build . --config Debug)
+ if(run_BuildDepends_skip_step_3)
+ return()
+ endif()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${fs_delay}) # handle 1s resolution
+ include(${RunCMake_SOURCE_DIR}/${CASE}.step3.cmake OPTIONAL)
+ set(check_step 3)
+ run_cmake_command(${CASE}-build3 ${CMAKE_COMMAND} --build . --config Debug)
endfunction()
+set(run_BuildDepends_skip_step_3 1)
+
run_BuildDepends(C-Exe)
if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
if(RunCMake_GENERATOR MATCHES "Visual Studio 10" OR
@@ -130,3 +139,28 @@ if(CMake_TEST_BuildDepends_GNU_AS)
set(ENV{ASM} "${CMake_TEST_BuildDepends_GNU_AS}")
run_BuildDepends(GNU-AS)
endif()
+
+if ((RunCMake_GENERATOR STREQUAL "Unix Makefiles"
+ AND (CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
+ OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"))
+ OR (RunCMake_GENERATOR STREQUAL "NMake Makefiles"
+ AND MSVC_VERSION GREATER 1300
+ AND CMAKE_C_COMPILER_ID STREQUAL "MSVC"))
+ run_BuildDepends(CompilerDependencies)
+ run_BuildDepends(CustomCommandDependencies)
+endif()
+
+if (RunCMake_GENERATOR MATCHES "Makefiles")
+ run_cmake(CustomCommandDependencies-BadArgs)
+endif()
+
+if(RunCMake_GENERATOR MATCHES "Make|Ninja")
+ unset(run_BuildDepends_skip_step_3)
+ run_BuildDepends(CustomCommandDepfile)
+ set(run_BuildDepends_skip_step_3 1)
+endif()
+
+if(RunCMake_GENERATOR MATCHES "Make")
+ run_BuildDepends(MakeDependencies)
+endif()