summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-21 13:16:56 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-10-21 13:16:56 (GMT)
commit740f85a204d7a837e3ad408a79992f6a9c0b000c (patch)
tree55e55d20f5f8777e5c1e860e3a0d476a40d26255 /Tests/RunCMake
parent8bcf2c81fc2a2bc458d54f9d5dbd40b49e5b993e (diff)
parenta4bbdc5ecf4d2b66346e1006cee891acf95c8ad8 (diff)
downloadCMake-740f85a204d7a837e3ad408a79992f6a9c0b000c.zip
CMake-740f85a204d7a837e3ad408a79992f6a9c0b000c.tar.gz
CMake-740f85a204d7a837e3ad408a79992f6a9c0b000c.tar.bz2
Merge topic 'cmLocalGenerator-generator-target-storage'
a4bbdc5e cmLocalGenerator: Remove cmGeneratorTargetsType from setter API. 04b6bb16 cmLocalGenerator: Simplify semantic of adding generator targets. 400e3d19 cmLocalGenerator: Don't store imported generator targets 726e461b CMP0063: Split unit test by target type.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe-stderr.txt15
-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.txt15
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake11
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta-stderr.txt15
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-sta.cmake11
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-yes-stderr.txt50
-rw-r--r--Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake4
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)