summaryrefslogtreecommitdiffstats
path: root/Tests/VisibilityInlinesHidden
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-22 19:24:18 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-22 19:24:18 (GMT)
commit771f1b00dc1e9422e543534ca2ea823c98b3e2be (patch)
treed03ae2d748632c1029d0cedfaf99357e839b174d /Tests/VisibilityInlinesHidden
parentab55b3b5faac694c28d8725e235923803fb83a8d (diff)
downloadCMake-771f1b00dc1e9422e543534ca2ea823c98b3e2be.zip
CMake-771f1b00dc1e9422e543534ca2ea823c98b3e2be.tar.gz
CMake-771f1b00dc1e9422e543534ca2ea823c98b3e2be.tar.bz2
Tests: Rename Visibility{InlinesHidden =>}
We will soon generalize it to cover other visibility properties.
Diffstat (limited to 'Tests/VisibilityInlinesHidden')
-rw-r--r--Tests/VisibilityInlinesHidden/CMakeLists.txt14
-rw-r--r--Tests/VisibilityInlinesHidden/bar.c1
-rw-r--r--Tests/VisibilityInlinesHidden/foo.cpp11
-rw-r--r--Tests/VisibilityInlinesHidden/verify.cmake14
4 files changed, 0 insertions, 40 deletions
diff --git a/Tests/VisibilityInlinesHidden/CMakeLists.txt b/Tests/VisibilityInlinesHidden/CMakeLists.txt
deleted file mode 100644
index 8ebc39c..0000000
--- a/Tests/VisibilityInlinesHidden/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-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
-)
diff --git a/Tests/VisibilityInlinesHidden/bar.c b/Tests/VisibilityInlinesHidden/bar.c
deleted file mode 100644
index e425999..0000000
--- a/Tests/VisibilityInlinesHidden/bar.c
+++ /dev/null
@@ -1 +0,0 @@
-void bar() {}
diff --git a/Tests/VisibilityInlinesHidden/foo.cpp b/Tests/VisibilityInlinesHidden/foo.cpp
deleted file mode 100644
index 2b66b69..0000000
--- a/Tests/VisibilityInlinesHidden/foo.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-class Foo
-{
-public:
- void bar() {}
-};
-
-void baz()
-{
- Foo foo;
- foo.bar();
-}
diff --git a/Tests/VisibilityInlinesHidden/verify.cmake b/Tests/VisibilityInlinesHidden/verify.cmake
deleted file mode 100644
index 80dd13c..0000000
--- a/Tests/VisibilityInlinesHidden/verify.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-execute_process(COMMAND ${CMAKE_NM} -D ${TEST_LIBRARY_PATH}
- RESULT_VARIABLE RESULT
- OUTPUT_VARIABLE OUTPUT
- ERROR_VARIABLE ERROR
-)
-
-if(NOT "${RESULT}" STREQUAL "0")
- message(FATAL_ERROR "nm failed [${RESULT}] [${OUTPUT}] [${ERROR}]")
-endif()
-
-if(${OUTPUT} MATCHES "Foo[^\\n]*bar")
- message(FATAL_ERROR
- "Found Foo::bar() which should have been hidden [${OUTPUT}]")
-endif()