summaryrefslogtreecommitdiffstats
path: root/Tests/VisibilityInlinesHidden/CMakeLists.txt
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-01-31 15:09:06 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-02-01 08:55:24 (GMT)
commitefdcebddbdc47e91254461da40cec2be869a0940 (patch)
tree7af9af19107e401314c32e71ee28f413ef700c49 /Tests/VisibilityInlinesHidden/CMakeLists.txt
parentf35c01e2a5e3834094fbd98eccfc2a686872fceb (diff)
downloadCMake-efdcebddbdc47e91254461da40cec2be869a0940.zip
CMake-efdcebddbdc47e91254461da40cec2be869a0940.tar.gz
CMake-efdcebddbdc47e91254461da40cec2be869a0940.tar.bz2
VisibilityInlinesHidden: only apply -fvisibility-inlines-hidden to C++ sources
Diffstat (limited to 'Tests/VisibilityInlinesHidden/CMakeLists.txt')
-rw-r--r--Tests/VisibilityInlinesHidden/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/VisibilityInlinesHidden/CMakeLists.txt b/Tests/VisibilityInlinesHidden/CMakeLists.txt
new file mode 100644
index 0000000..8ebc39c
--- /dev/null
+++ b/Tests/VisibilityInlinesHidden/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(VisibilityInlinesHidden)
+
+add_library(inlines_hidden SHARED foo.cpp bar.c)
+set_property(TARGET inlines_hidden PROPERTY VISIBILITY_INLINES_HIDDEN ON)
+target_compile_options(inlines_hidden PRIVATE -Werror)
+
+add_custom_command(TARGET inlines_hidden POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ -DCMAKE_NM=${CMAKE_NM}
+ -DTEST_LIBRARY_PATH=$<TARGET_FILE:inlines_hidden>
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/verify.cmake
+)