diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt | 17 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake | 18 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0116/RunCMakeTest.cmake | 3 |
3 files changed, 38 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt b/Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt new file mode 100644 index 0000000..10e83a9 --- /dev/null +++ b/Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt @@ -0,0 +1,17 @@ +^CMake Warning \(dev\) at CMP0116-Mixed\.cmake:1 \(add_custom_command\): + Policy CMP0116 is not set: Ninja generators transform DEPFILEs from + add_custom_command\(\)\. Run "cmake --help-policy CMP0116" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\.( + +CMake Warning \(dev\) at CMP0116-Mixed\.cmake:1 \(add_custom_command\): + Policy CMP0116 is not set: Ninja generators transform DEPFILEs from + add_custom_command\(\)\. Run "cmake --help-policy CMP0116" for policy + details\. Use the cmake_policy command to set the policy and suppress this + warning\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\.)*$ diff --git a/Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake b/Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake new file mode 100644 index 0000000..6cbbc09 --- /dev/null +++ b/Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake @@ -0,0 +1,18 @@ +add_custom_command( + OUTPUT warn.txt + COMMAND ${CMAKE_COMMAND} -E touch warn.txt + DEPFILE warn.d + ) +cmake_policy(SET CMP0116 OLD) +add_custom_command( + OUTPUT old.txt + COMMAND ${CMAKE_COMMAND} -E touch old.txt + DEPFILE old.d + ) +cmake_policy(SET CMP0116 NEW) +add_custom_command( + OUTPUT new.txt + COMMAND ${CMAKE_COMMAND} -E touch new.txt + DEPFILE new.d + ) +add_custom_target(cc ALL DEPENDS warn.txt old.txt new.txt) diff --git a/Tests/RunCMake/CMP0116/RunCMakeTest.cmake b/Tests/RunCMake/CMP0116/RunCMakeTest.cmake index 8a83cc1..ce3e86a 100644 --- a/Tests/RunCMake/CMP0116/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0116/RunCMakeTest.cmake @@ -47,3 +47,6 @@ run_cmp0116(NEW OFF) run_cmp0116(WARN ON) run_cmp0116(OLD ON) run_cmp0116(NEW ON) + +set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_WARNING_CMP0116:BOOL=TRUE) +run_cmake(CMP0116-Mixed) |