diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-05-23 13:32:17 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-06-02 10:00:51 (GMT) |
commit | cd1fa537a03377974a4d0a27e592785f931a41e5 (patch) | |
tree | 4b8ca66e58a08ed81c1200700317b8ae6737a7d2 /Tests | |
parent | 0e9f4bc00c6b26f254e74063e4026ac33b786513 (diff) | |
download | CMake-cd1fa537a03377974a4d0a27e592785f931a41e5.zip CMake-cd1fa537a03377974a4d0a27e592785f931a41e5.tar.gz CMake-cd1fa537a03377974a4d0a27e592785f931a41e5.tar.bz2 |
Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
This corresponds to the g++ and clang++
option -fvisibility-inlines-hidden on linux. On Windows with MinGW,
this corresponds to -fno-keep-inline-dllexport. That option is
not supported by clang currently.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt b/Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt index ffa9380..2571d22 100644 --- a/Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt +++ b/Tests/Module/GenerateExportHeader/visibility_preset/CMakeLists.txt @@ -1,9 +1,13 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) if (CMAKE_CXX_FLAGS MATCHES "-fvisibility=hidden") message(SEND_ERROR "Do not use add_compiler_export_flags before adding this directory") endif() +if (CMAKE_CXX_FLAGS MATCHES "-fvisibility-inlines-hidden") + message(SEND_ERROR "Do not use add_compiler_export_flags before adding this directory") +endif() add_library(visibility_preset SHARED visibility_preset.cpp) generate_export_header(visibility_preset) |