diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-01-31 15:09:06 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-02-01 08:55:24 (GMT) |
commit | efdcebddbdc47e91254461da40cec2be869a0940 (patch) | |
tree | 7af9af19107e401314c32e71ee28f413ef700c49 /Tests/VisibilityInlinesHidden/verify.cmake | |
parent | f35c01e2a5e3834094fbd98eccfc2a686872fceb (diff) | |
download | CMake-efdcebddbdc47e91254461da40cec2be869a0940.zip CMake-efdcebddbdc47e91254461da40cec2be869a0940.tar.gz CMake-efdcebddbdc47e91254461da40cec2be869a0940.tar.bz2 |
VisibilityInlinesHidden: only apply -fvisibility-inlines-hidden to C++ sources
Diffstat (limited to 'Tests/VisibilityInlinesHidden/verify.cmake')
-rw-r--r-- | Tests/VisibilityInlinesHidden/verify.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/VisibilityInlinesHidden/verify.cmake b/Tests/VisibilityInlinesHidden/verify.cmake new file mode 100644 index 0000000..80dd13c --- /dev/null +++ b/Tests/VisibilityInlinesHidden/verify.cmake @@ -0,0 +1,14 @@ +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() |