diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-20 21:54:33 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-20 21:58:48 (GMT) |
commit | 726e461b3885aca4144ec79d08bf62c7ebade96d (patch) | |
tree | a5a566000f9f8946e5e9a45b75b54a5f46fb4591 /Tests | |
parent | 9afbb733ec2a55424e6c25c6afa7fdd14219d6b1 (diff) | |
download | CMake-726e461b3885aca4144ec79d08bf62c7ebade96d.zip CMake-726e461b3885aca4144ec79d08bf62c7ebade96d.tar.gz CMake-726e461b3885aca4144ec79d08bf62c7ebade96d.tar.bz2 |
CMP0063: Split unit test by target type.
Don't rely on the order of warnings for targets being deterministic.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake (renamed from Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes.cmake) | 5 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake | 11 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta.cmake | 11 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt | 50 | ||||
-rw-r--r-- | Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake | 4 |
8 files changed, 74 insertions, 52 deletions
diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt new file mode 100644 index 0000000..b8d726f --- /dev/null +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) at CMP0063-WARN-exe.cmake:[0-9]+ \(add_executable\): + Policy CMP0063 is not set: Honor visibility properties for all target + types. Run "cmake --help-policy CMP0063" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + Target "myexe" of type "EXECUTABLE" has the following visibility properties + set for CXX: + + CXX_VISIBILITY_PRESET + VISIBILITY_INLINES_HIDDEN + + For compatibility CMake is not honoring them for this target. +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/VisibilityPreset/CMP0063-WARN-yes.cmake b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake index 3388e4d..cef1d75 100644 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes.cmake +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake @@ -5,4 +5,7 @@ enable_language(CXX) set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") -include(CMP0063-Common.cmake) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) + +add_executable(myexe lib.cpp) diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt new file mode 100644 index 0000000..3a7732a --- /dev/null +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) at CMP0063-WARN-obj.cmake:[0-9]+ \(add_library\): + Policy CMP0063 is not set: Honor visibility properties for all target + types. Run "cmake --help-policy CMP0063" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + Target "myobject" of type "OBJECT_LIBRARY" has the following visibility + properties set for CXX: + + CXX_VISIBILITY_PRESET + VISIBILITY_INLINES_HIDDEN + + For compatibility CMake is not honoring them for this target. +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/VisibilityPreset/CMP0063-WARN-obj.cmake b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake new file mode 100644 index 0000000..81d1c33 --- /dev/null +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake @@ -0,0 +1,11 @@ + +enable_language(CXX) + +# Ensure CMake warns even if toolchain does not really have these flags. +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") + +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) + +add_library(myobject OBJECT lib.cpp) diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt new file mode 100644 index 0000000..1efa1b5 --- /dev/null +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) at CMP0063-WARN-sta.cmake:[0-9]+ \(add_library\): + Policy CMP0063 is not set: Honor visibility properties for all target + types. Run "cmake --help-policy CMP0063" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + Target "mystatic" of type "STATIC_LIBRARY" has the following visibility + properties set for CXX: + + CXX_VISIBILITY_PRESET + VISIBILITY_INLINES_HIDDEN + + For compatibility CMake is not honoring them for this target. +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/VisibilityPreset/CMP0063-WARN-sta.cmake b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta.cmake new file mode 100644 index 0000000..132e076 --- /dev/null +++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta.cmake @@ -0,0 +1,11 @@ + +enable_language(CXX) + +# Ensure CMake warns even if toolchain does not really have these flags. +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") + +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) + +add_library(mystatic STATIC lib.cpp) diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt deleted file mode 100644 index 59a4b8f..0000000 --- a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt +++ /dev/null @@ -1,50 +0,0 @@ -^CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_executable\): - Policy CMP0063 is not set: Honor visibility properties for all target - types. Run "cmake --help-policy CMP0063" for policy details. Use the - cmake_policy command to set the policy and suppress this warning. - - Target "myexe" of type "EXECUTABLE" has the following visibility properties - set for CXX: - - CXX_VISIBILITY_PRESET - VISIBILITY_INLINES_HIDDEN - - For compatibility CMake is not honoring them for this target. -Call Stack \(most recent call first\): - CMP0063-WARN-yes.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. -+ -CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_library\): - Policy CMP0063 is not set: Honor visibility properties for all target - types. Run "cmake --help-policy CMP0063" for policy details. Use the - cmake_policy command to set the policy and suppress this warning. - - Target "myobject" of type "OBJECT_LIBRARY" has the following visibility - properties set for CXX: - - CXX_VISIBILITY_PRESET - VISIBILITY_INLINES_HIDDEN - - For compatibility CMake is not honoring them for this target. -Call Stack \(most recent call first\): - CMP0063-WARN-yes.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it. -+ -CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_library\): - Policy CMP0063 is not set: Honor visibility properties for all target - types. Run "cmake --help-policy CMP0063" for policy details. Use the - cmake_policy command to set the policy and suppress this warning. - - Target "mystatic" of type "STATIC_LIBRARY" has the following visibility - properties set for CXX: - - CXX_VISIBILITY_PRESET - VISIBILITY_INLINES_HIDDEN - - For compatibility CMake is not honoring them for this target. -Call Stack \(most recent call first\): - CMP0063-WARN-yes.cmake:[0-9]+ \(include\) - CMakeLists.txt:[0-9]+ \(include\) -This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake index c7eb808..7a000ee 100644 --- a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake +++ b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake @@ -2,6 +2,8 @@ include(RunCMake) run_cmake(PropertyTypo) run_cmake(CMP0063-OLD) -run_cmake(CMP0063-WARN-yes) +run_cmake(CMP0063-WARN-exe) +run_cmake(CMP0063-WARN-obj) +run_cmake(CMP0063-WARN-sta) run_cmake(CMP0063-WARN-no) run_cmake(CMP0063-NEW) |