Explorar o código

Merge topic 'test-RunCMake.CMP0037-everywhere'

8c6c1f1 Enable RunCMake.CMP0037 test everywhere
Brad King %!s(int64=12) %!d(string=hai) anos
pai
achega
298ef43329

+ 0 - 0
Tests/RunCMake/CMP0037/CMP0037-NEW-result.txt → Tests/RunCMake/CMP0037/CMP0037-NEW-colon-result.txt


+ 19 - 0
Tests/RunCMake/CMP0037/CMP0037-NEW-colon-stderr.txt

@@ -0,0 +1,19 @@
+CMake Error at CMP0037-NEW-colon.cmake:4 \(add_library\):
+  Policy CMP0037 is not set: Target names 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 "lib:colon" is 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\)
++
+CMake Error at CMP0037-NEW-colon.cmake:5 \(add_executable\):
+  Policy CMP0037 is not set: Target names 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 "exe:colon" is 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\)

+ 5 - 0
Tests/RunCMake/CMP0037/CMP0037-NEW-colon.cmake

@@ -0,0 +1,5 @@
+
+cmake_policy(SET CMP0037 NEW)
+
+add_library("lib:colon" empty.cpp)
+add_executable("exe:colon" empty.cpp)

+ 1 - 0
Tests/RunCMake/CMP0037/CMP0037-NEW-space-result.txt

@@ -0,0 +1 @@
+1

+ 19 - 0
Tests/RunCMake/CMP0037/CMP0037-NEW-space-stderr.txt

@@ -0,0 +1,19 @@
+CMake Error at CMP0037-NEW-space.cmake:4 \(add_library\):
+  Policy CMP0037 is not set: Target names 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 "lib with spaces" is 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\)
++
+CMake Error at CMP0037-NEW-space.cmake:5 \(add_executable\):
+  Policy CMP0037 is not set: Target names 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 "exe with spaces" is 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\)

+ 0 - 2
Tests/RunCMake/CMP0037/CMP0037-NEW.cmake → Tests/RunCMake/CMP0037/CMP0037-NEW-space.cmake

@@ -3,5 +3,3 @@ cmake_policy(SET CMP0037 NEW)
 
 add_library("lib with spaces" empty.cpp)
 add_executable("exe with spaces" empty.cpp)
-add_library("lib:colon" empty.cpp)
-add_executable("exe:colon" empty.cpp)

+ 0 - 39
Tests/RunCMake/CMP0037/CMP0037-NEW-stderr.txt

@@ -1,39 +0,0 @@
-CMake Error at CMP0037-NEW.cmake:4 \(add_library\):
-  Policy CMP0037 is not set: Target names 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 "lib with spaces" is 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\)
-+
-CMake Error at CMP0037-NEW.cmake:5 \(add_executable\):
-  Policy CMP0037 is not set: Target names 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 "exe with spaces" is 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\)
-+
-CMake Error at CMP0037-NEW.cmake:6 \(add_library\):
-  Policy CMP0037 is not set: Target names 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 "lib:colon" is 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\)
-+
-CMake Error at CMP0037-NEW.cmake:7 \(add_executable\):
-  Policy CMP0037 is not set: Target names 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 "exe:colon" is 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\)

+ 0 - 0
Tests/RunCMake/CMP0037/CMP0037-OLD-result.txt → Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt


+ 0 - 0
Tests/RunCMake/CMP0037/CMP0037-OLD-stderr.txt → Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt


+ 0 - 0
Tests/RunCMake/CMP0037/CMP0037-OLD.cmake → Tests/RunCMake/CMP0037/CMP0037-OLD-space.cmake


+ 0 - 0
Tests/RunCMake/CMP0037/CMP0037-WARN-result.txt → Tests/RunCMake/CMP0037/CMP0037-WARN-colon-result.txt


+ 21 - 0
Tests/RunCMake/CMP0037/CMP0037-WARN-colon-stderr.txt

@@ -0,0 +1,21 @@
+CMake Warning \(dev\) at CMP0037-WARN-colon.cmake:2 \(add_library\):
+  Policy CMP0037 is not set: Target names 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 "lib:colon" is 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-colon.cmake:3 \(add_executable\):
+  Policy CMP0037 is not set: Target names 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 "exe:colon" is 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.

+ 3 - 0
Tests/RunCMake/CMP0037/CMP0037-WARN-colon.cmake

@@ -0,0 +1,3 @@
+
+add_library("lib:colon" empty.cpp)
+add_executable("exe:colon" empty.cpp)

+ 1 - 0
Tests/RunCMake/CMP0037/CMP0037-WARN-space-result.txt

@@ -0,0 +1 @@
+0

+ 21 - 0
Tests/RunCMake/CMP0037/CMP0037-WARN-space-stderr.txt

@@ -0,0 +1,21 @@
+CMake Warning \(dev\) at CMP0037-WARN-space.cmake:2 \(add_library\):
+  Policy CMP0037 is not set: Target names 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 "lib with spaces" is 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-space.cmake:3 \(add_executable\):
+  Policy CMP0037 is not set: Target names 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 "exe with spaces" is 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.

+ 0 - 2
Tests/RunCMake/CMP0037/CMP0037-WARN.cmake → Tests/RunCMake/CMP0037/CMP0037-WARN-space.cmake

@@ -1,5 +1,3 @@
 
 add_library("lib with spaces" empty.cpp)
 add_executable("exe with spaces" empty.cpp)
-add_library("lib:colon" empty.cpp)
-add_executable("exe:colon" empty.cpp)

+ 0 - 43
Tests/RunCMake/CMP0037/CMP0037-WARN-stderr.txt

@@ -1,43 +0,0 @@
-CMake Warning \(dev\) at CMP0037-WARN.cmake:2 \(add_library\):
-  Policy CMP0037 is not set: Target names 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 "lib with spaces" is 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.cmake:3 \(add_executable\):
-  Policy CMP0037 is not set: Target names 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 "exe with spaces" is 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.cmake:4 \(add_library\):
-  Policy CMP0037 is not set: Target names 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 "lib:colon" is 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.cmake:5 \(add_executable\):
-  Policy CMP0037 is not set: Target names 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 "exe:colon" is 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.

+ 8 - 3
Tests/RunCMake/CMP0037/RunCMakeTest.cmake

@@ -1,5 +1,10 @@
 include(RunCMake)
 
-run_cmake(CMP0037-NEW)
-run_cmake(CMP0037-OLD)
-run_cmake(CMP0037-WARN)
+run_cmake(CMP0037-OLD-space)
+run_cmake(CMP0037-NEW-space)
+run_cmake(CMP0037-WARN-space)
+run_cmake(CMP0037-NEW-colon)
+
+if(NOT (WIN32 AND "${RunCMake_GENERATOR}" MATCHES "Make"))
+  run_cmake(CMP0037-WARN-colon)
+endif()

+ 1 - 3
Tests/RunCMake/CMakeLists.txt

@@ -56,9 +56,7 @@ add_RunCMake_test(CMP0022)
 add_RunCMake_test(CMP0026)
 add_RunCMake_test(CMP0027)
 add_RunCMake_test(CMP0028)
-if (NOT "${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW|NMake|Borland) Makefiles")
-  add_RunCMake_test(CMP0037)
-endif()
+add_RunCMake_test(CMP0037)
 add_RunCMake_test(CMP0038)
 add_RunCMake_test(CMP0039)
 add_RunCMake_test(CTest)