mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
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.
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
include(Compiler/Clang)
|
||||
__compiler_clang(CXX)
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
|
||||
@@ -1,2 +1,12 @@
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(CXX)
|
||||
|
||||
if (WIN32)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport")
|
||||
endif()
|
||||
else()
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user