summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-20 21:54:33 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-20 21:58:48 (GMT)
commit726e461b3885aca4144ec79d08bf62c7ebade96d (patch)
treea5a566000f9f8946e5e9a45b75b54a5f46fb4591 /Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake
parent9afbb733ec2a55424e6c25c6afa7fdd14219d6b1 (diff)
downloadCMake-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/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake')
-rw-r--r--Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.cmake
new file mode 100644
index 0000000..cef1d75
--- /dev/null
+++ b/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-exe.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_executable(myexe lib.cpp)