summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-22 14:43:34 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-22 18:56:00 (GMT)
commitab55b3b5faac694c28d8725e235923803fb83a8d (patch)
tree8fc03364418a82b74501baad32feb49152def76d /Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake
parentd0f59d359830c68fc7f1a295b9f0ba7ce331d867 (diff)
downloadCMake-ab55b3b5faac694c28d8725e235923803fb83a8d.zip
CMake-ab55b3b5faac694c28d8725e235923803fb83a8d.tar.gz
CMake-ab55b3b5faac694c28d8725e235923803fb83a8d.tar.bz2
Tests: Refactor RunCMake.VisibilityPreset test setup
Enable languages only in the individual test case. Enable the test everywhere except Visual Studio generators (which do not implement the properties) and just set fake flags as needed to activate relevant code paths. Drop unneeded CMAKE_SUPPRESS_REGENERATION which seems to have been copied from an unrelated test when this test was created.
Diffstat (limited to 'Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake')
-rw-r--r--Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake b/Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake
index 03c0ed9..c6e9dd9 100644
--- a/Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake
+++ b/Tests/RunCMake/VisibilityPreset/PropertyTypo.cmake
@@ -1,3 +1,8 @@
+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=")
add_library(visibility_preset SHARED lib.cpp)
set_property(TARGET visibility_preset PROPERTY CXX_VISIBILITY_PRESET hiden)