From 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac Mon Sep 17 00:00:00 2001 From: Brad King Date: Sat, 3 Sep 2016 07:50:47 -0400 Subject: [PATCH] GNU: Do not use -fvisibility on AIX or HP-UX Use of `-fvisibility=hidden` warns: warning: visibility attribute not supported in this configuration; ignored --- Modules/Platform/AIX-GNU-CXX.cmake | 1 + Modules/Platform/AIX-GNU.cmake | 1 + Modules/Platform/HP-UX-GNU-CXX.cmake | 1 + Modules/Platform/HP-UX-GNU.cmake | 1 + 4 files changed, 4 insertions(+) diff --git a/Modules/Platform/AIX-GNU-CXX.cmake b/Modules/Platform/AIX-GNU-CXX.cmake index ec8e83fa1..d04780102 100644 --- a/Modules/Platform/AIX-GNU-CXX.cmake +++ b/Modules/Platform/AIX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/AIX-GNU) __aix_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index df97ab105..ce6faffd2 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -34,4 +34,5 @@ macro(__aix_compiler_gnu lang) set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro() diff --git a/Modules/Platform/HP-UX-GNU-CXX.cmake b/Modules/Platform/HP-UX-GNU-CXX.cmake index 689bed088..ac725604d 100644 --- a/Modules/Platform/HP-UX-GNU-CXX.cmake +++ b/Modules/Platform/HP-UX-GNU-CXX.cmake @@ -1,2 +1,3 @@ include(Platform/HP-UX-GNU) __hpux_compiler_gnu(CXX) +unset(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index 6c717842a..cbd81643f 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -26,4 +26,5 @@ macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") + unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endmacro()