diff options
Diffstat (limited to 'Tests/RunCMake/CMP0037')
18 files changed, 98 insertions, 89 deletions
diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-result.txt b/Tests/RunCMake/CMP0037/CMP0037-NEW-colon-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-NEW-result.txt +++ b/Tests/RunCMake/CMP0037/CMP0037-NEW-colon-result.txt diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-colon-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-NEW-colon-stderr.txt new file mode 100644 index 0000000..aadc7d7 --- /dev/null +++ b/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\) diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-colon.cmake b/Tests/RunCMake/CMP0037/CMP0037-NEW-colon.cmake new file mode 100644 index 0000000..5c564f3 --- /dev/null +++ b/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) diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-space-result.txt b/Tests/RunCMake/CMP0037/CMP0037-NEW-space-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0037/CMP0037-NEW-space-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-space-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-NEW-space-stderr.txt new file mode 100644 index 0000000..169db86 --- /dev/null +++ b/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\) diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW.cmake b/Tests/RunCMake/CMP0037/CMP0037-NEW-space.cmake index a6ffc59..9e2faaa 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-NEW.cmake +++ b/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) diff --git a/Tests/RunCMake/CMP0037/CMP0037-NEW-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-NEW-stderr.txt deleted file mode 100644 index 6de96b1..0000000 --- a/Tests/RunCMake/CMP0037/CMP0037-NEW-stderr.txt +++ /dev/null @@ -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\) diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-result.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt index 573541a..573541a 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-WARN-result.txt +++ b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-result.txt diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt index 10f3293..10f3293 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0037/CMP0037-OLD-space-stderr.txt diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD.cmake b/Tests/RunCMake/CMP0037/CMP0037-OLD-space.cmake index af98f12..af98f12 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-OLD.cmake +++ b/Tests/RunCMake/CMP0037/CMP0037-OLD-space.cmake diff --git a/Tests/RunCMake/CMP0037/CMP0037-OLD-result.txt b/Tests/RunCMake/CMP0037/CMP0037-WARN-colon-result.txt index 573541a..573541a 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-OLD-result.txt +++ b/Tests/RunCMake/CMP0037/CMP0037-WARN-colon-result.txt diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-colon-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-WARN-colon-stderr.txt new file mode 100644 index 0000000..c9366fa --- /dev/null +++ b/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. diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-colon.cmake b/Tests/RunCMake/CMP0037/CMP0037-WARN-colon.cmake new file mode 100644 index 0000000..17c815e --- /dev/null +++ b/Tests/RunCMake/CMP0037/CMP0037-WARN-colon.cmake @@ -0,0 +1,3 @@ + +add_library("lib:colon" empty.cpp) +add_executable("exe:colon" empty.cpp) diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-space-result.txt b/Tests/RunCMake/CMP0037/CMP0037-WARN-space-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0037/CMP0037-WARN-space-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-space-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-WARN-space-stderr.txt new file mode 100644 index 0000000..b29aad5 --- /dev/null +++ b/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. diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN.cmake b/Tests/RunCMake/CMP0037/CMP0037-WARN-space.cmake index 2beaad0..4a10828 100644 --- a/Tests/RunCMake/CMP0037/CMP0037-WARN.cmake +++ b/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) diff --git a/Tests/RunCMake/CMP0037/CMP0037-WARN-stderr.txt b/Tests/RunCMake/CMP0037/CMP0037-WARN-stderr.txt deleted file mode 100644 index e7a9e1d..0000000 --- a/Tests/RunCMake/CMP0037/CMP0037-WARN-stderr.txt +++ /dev/null @@ -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. diff --git a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake index e983526..fbb1788 100644 --- a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake +++ b/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() |