diff options
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-NEW-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-OLD-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-UNSET-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/CMP0093-UNSET.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/FindBoost/RunCMakeTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/CustomCommandJobPool.cmake | 17 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/JobPoolUsesTerminal-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/JobPoolUsesTerminal-stderr.txt | 9 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/JobPoolUsesTerminal.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 2 |
13 files changed, 51 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindBoost/CMP0093-NEW-stdout.txt b/Tests/RunCMake/FindBoost/CMP0093-NEW-stdout.txt new file mode 100644 index 0000000..62a6d39 --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-NEW-stdout.txt @@ -0,0 +1 @@ +-- Boost_VERSION=1.70.0 diff --git a/Tests/RunCMake/FindBoost/CMP0093-NEW.cmake b/Tests/RunCMake/FindBoost/CMP0093-NEW.cmake new file mode 100644 index 0000000..64f44d2 --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0093 NEW) +include(ModuleMode.cmake) diff --git a/Tests/RunCMake/FindBoost/CMP0093-OLD-stdout.txt b/Tests/RunCMake/FindBoost/CMP0093-OLD-stdout.txt new file mode 100644 index 0000000..9e51e35 --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-OLD-stdout.txt @@ -0,0 +1 @@ +-- Boost_VERSION=107000 diff --git a/Tests/RunCMake/FindBoost/CMP0093-OLD.cmake b/Tests/RunCMake/FindBoost/CMP0093-OLD.cmake new file mode 100644 index 0000000..69a3a95 --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0093 OLD) +include(ModuleMode.cmake) diff --git a/Tests/RunCMake/FindBoost/CMP0093-UNSET-stdout.txt b/Tests/RunCMake/FindBoost/CMP0093-UNSET-stdout.txt new file mode 100644 index 0000000..9e51e35 --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-UNSET-stdout.txt @@ -0,0 +1 @@ +-- Boost_VERSION=107000 diff --git a/Tests/RunCMake/FindBoost/CMP0093-UNSET.cmake b/Tests/RunCMake/FindBoost/CMP0093-UNSET.cmake new file mode 100644 index 0000000..974094a --- /dev/null +++ b/Tests/RunCMake/FindBoost/CMP0093-UNSET.cmake @@ -0,0 +1 @@ +include(ModuleMode.cmake) diff --git a/Tests/RunCMake/FindBoost/RunCMakeTest.cmake b/Tests/RunCMake/FindBoost/RunCMakeTest.cmake index d66bda1..3916890 100644 --- a/Tests/RunCMake/FindBoost/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindBoost/RunCMakeTest.cmake @@ -14,3 +14,7 @@ run_cmake(ConfigModeNotFound) run_cmake(ModuleModeNotFound) unset(RunCMake-stdout-file) unset(RunCMake-stderr-file) + +run_cmake(CMP0093-NEW) +run_cmake(CMP0093-OLD) +run_cmake(CMP0093-UNSET) diff --git a/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake b/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake new file mode 100644 index 0000000..7f7fa33 --- /dev/null +++ b/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake @@ -0,0 +1,8 @@ +set(log "${RunCMake_BINARY_DIR}/CustomCommandJobPool-build/build.ninja") +file(READ "${log}" build_file) +if(NOT "${build_file}" MATCHES "pool = custom_command_pool") + set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_command_pool") +endif() +if(NOT "${build_file}" MATCHES "pool = custom_target_pool") + set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_target_pool") +endif() diff --git a/Tests/RunCMake/Ninja/CustomCommandJobPool.cmake b/Tests/RunCMake/Ninja/CustomCommandJobPool.cmake new file mode 100644 index 0000000..1e36e65 --- /dev/null +++ b/Tests/RunCMake/Ninja/CustomCommandJobPool.cmake @@ -0,0 +1,17 @@ +add_custom_command( + OUTPUT hello.copy.c + COMMAND "${CMAKE_COMMAND}" -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/hello.c" + hello.copy.c + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + JOB_POOL "custom_command_pool" + ) +add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hello.copy.c") + +add_custom_target( + hello.echo + COMMAND echo + JOB_POOL "custom_target_pool" +) + +include(CheckNoPrefixSubDir.cmake) diff --git a/Tests/RunCMake/Ninja/JobPoolUsesTerminal-result.txt b/Tests/RunCMake/Ninja/JobPoolUsesTerminal-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Ninja/JobPoolUsesTerminal-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Ninja/JobPoolUsesTerminal-stderr.txt b/Tests/RunCMake/Ninja/JobPoolUsesTerminal-stderr.txt new file mode 100644 index 0000000..45975ca --- /dev/null +++ b/Tests/RunCMake/Ninja/JobPoolUsesTerminal-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at JobPoolUsesTerminal.cmake:1 \(add_custom_command\): + add_custom_command JOB_POOL is shadowed by USES_TERMINAL. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at JobPoolUsesTerminal.cmake:2 \(add_custom_target\): + add_custom_target JOB_POOL is shadowed by USES_TERMINAL. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Ninja/JobPoolUsesTerminal.cmake b/Tests/RunCMake/Ninja/JobPoolUsesTerminal.cmake new file mode 100644 index 0000000..b7e440c --- /dev/null +++ b/Tests/RunCMake/Ninja/JobPoolUsesTerminal.cmake @@ -0,0 +1,2 @@ +add_custom_command(OUTPUT x COMMAND y USES_TERMINAL JOB_POOL z) +add_custom_target(CustomTarget COMMAND y USES_TERMINAL JOB_POOL z) diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 8fa650a..808a872 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -57,6 +57,8 @@ run_CMP0058(NEW-no) run_CMP0058(NEW-by) run_cmake(CustomCommandDepfile) +run_cmake(CustomCommandJobPool) +run_cmake(JobPoolUsesTerminal) run_cmake(RspFileC) run_cmake(RspFileCXX) |