diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-01-10 15:31:27 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-01-10 15:31:27 (GMT) |
commit | 7347e2f830b75dae94535b64d3925b55b098d88b (patch) | |
tree | 0ab85c5e0ad03e3017f6556d4d95c949599fbca1 /Modules/Compiler | |
parent | 68537b890ba155632b3679dc77c0e04148bf18d5 (diff) | |
download | CMake-7347e2f830b75dae94535b64d3925b55b098d88b.zip CMake-7347e2f830b75dae94535b64d3925b55b098d88b.tar.gz CMake-7347e2f830b75dae94535b64d3925b55b098d88b.tar.bz2 |
ObjC: Add VISIBLITY_INLINES_HIDDEN support
Fixes: #20193
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/AppleClang-OBJCXX.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/GNU-OBJC.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/GNU-OBJCXX.cmake | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/Modules/Compiler/AppleClang-OBJCXX.cmake b/Modules/Compiler/AppleClang-OBJCXX.cmake index 7c6f763..2c084af 100644 --- a/Modules/Compiler/AppleClang-OBJCXX.cmake +++ b/Modules/Compiler/AppleClang-OBJCXX.cmake @@ -1,5 +1,7 @@ include(Compiler/Clang-OBJCXX) +set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") + if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.0) set(CMAKE_OBJCXX98_STANDARD_COMPILE_OPTION "-std=c++98") set(CMAKE_OBJCXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") diff --git a/Modules/Compiler/GNU-OBJC.cmake b/Modules/Compiler/GNU-OBJC.cmake index 5fba801..fb9b0b2 100644 --- a/Modules/Compiler/GNU-OBJC.cmake +++ b/Modules/Compiler/GNU-OBJC.cmake @@ -1,6 +1,2 @@ include(Compiler/GNU) __compiler_gnu(OBJC) - -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2) - set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") -endif() diff --git a/Modules/Compiler/GNU-OBJCXX.cmake b/Modules/Compiler/GNU-OBJCXX.cmake index 66a547e..06f0244 100644 --- a/Modules/Compiler/GNU-OBJCXX.cmake +++ b/Modules/Compiler/GNU-OBJCXX.cmake @@ -1,8 +1,8 @@ include(Compiler/GNU) -__compiler_gnu(OBJC) +__compiler_gnu(OBJCXX) -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2) - set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") +if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.2) + set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() if(NOT CMAKE_OBJCXX_LINK_FLAGS) |