mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
Tests: Add RunCMake.CMP0037 case for WARN on reserved targets
This commit is contained in:
36
Tests/RunCMake/CMP0037/CMP0037-WARN-reserved-stderr.txt
Normal file
36
Tests/RunCMake/CMP0037/CMP0037-WARN-reserved-stderr.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
CMake Warning \(dev\) at CMP0037-WARN-reserved.cmake:2 \(add_library\):
|
||||||
|
Policy CMP0037 is not set: Target names should not be reserved and should
|
||||||
|
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
|
||||||
|
details. Use the cmake_policy command to set the policy and suppress this
|
||||||
|
warning.
|
||||||
|
|
||||||
|
The target name "all" is reserved or not valid for certain CMake features,
|
||||||
|
such as generator expressions, and may result in undefined behavior.
|
||||||
|
Call Stack \(most recent call first\):
|
||||||
|
CMakeLists.txt:3 \(include\)
|
||||||
|
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||||
|
+
|
||||||
|
CMake Warning \(dev\) at CMP0037-WARN-reserved.cmake:3 \(add_executable\):
|
||||||
|
Policy CMP0037 is not set: Target names should not be reserved and should
|
||||||
|
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
|
||||||
|
details. Use the cmake_policy command to set the policy and suppress this
|
||||||
|
warning.
|
||||||
|
|
||||||
|
The target name "clean" is reserved or not valid for certain CMake
|
||||||
|
features, such as generator expressions, and may result in undefined
|
||||||
|
behavior.
|
||||||
|
Call Stack \(most recent call first\):
|
||||||
|
CMakeLists.txt:3 \(include\)
|
||||||
|
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||||
|
+
|
||||||
|
CMake Warning \(dev\) at CMP0037-WARN-reserved.cmake:4 \(add_custom_target\):
|
||||||
|
Policy CMP0037 is not set: Target names should not be reserved and should
|
||||||
|
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
|
||||||
|
details. Use the cmake_policy command to set the policy and suppress this
|
||||||
|
warning.
|
||||||
|
|
||||||
|
The target name "help" is reserved or not valid for certain CMake features,
|
||||||
|
such as generator expressions, and may result in undefined behavior.
|
||||||
|
Call Stack \(most recent call first\):
|
||||||
|
CMakeLists.txt:3 \(include\)
|
||||||
|
This warning is for project developers. Use -Wno-dev to suppress it.
|
4
Tests/RunCMake/CMP0037/CMP0037-WARN-reserved.cmake
Normal file
4
Tests/RunCMake/CMP0037/CMP0037-WARN-reserved.cmake
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
enable_language(CXX)
|
||||||
|
add_library(all empty.cpp)
|
||||||
|
add_executable(clean empty.cpp)
|
||||||
|
add_custom_target(help)
|
@@ -9,5 +9,6 @@ if(NOT (WIN32 AND "${RunCMake_GENERATOR}" MATCHES "Make"))
|
|||||||
run_cmake(CMP0037-WARN-colon)
|
run_cmake(CMP0037-WARN-colon)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
run_cmake(CMP0037-WARN-reserved)
|
||||||
run_cmake(CMP0037-OLD-reserved)
|
run_cmake(CMP0037-OLD-reserved)
|
||||||
run_cmake(CMP0037-NEW-reserved)
|
run_cmake(CMP0037-NEW-reserved)
|
||||||
|
Reference in New Issue
Block a user