mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
Tests: Test per-CC behavior of CMP0116
This commit is contained in:
17
Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt
Normal file
17
Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt
Normal file
@@ -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\.)*$
|
||||
18
Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake
Normal file
18
Tests/RunCMake/CMP0116/CMP0116-Mixed.cmake
Normal file
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user