diff options
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 6ee7bd7..978a924 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -142,12 +142,10 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) if(WIN32) set(DEFINE_EXPORT "__declspec(dllexport)") set(DEFINE_IMPORT "__declspec(dllimport)") - elseif(CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Intel AND UNIX)) - if(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY) - set(DEFINE_EXPORT "__attribute__((visibility(\"default\")))") - set(DEFINE_IMPORT "__attribute__((visibility(\"default\")))") - set(DEFINE_NO_EXPORT "__attribute__((visibility(\"hidden\")))") - endif() + elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY) + set(DEFINE_EXPORT "__attribute__((visibility(\"default\")))") + set(DEFINE_IMPORT "__attribute__((visibility(\"default\")))") + set(DEFINE_NO_EXPORT "__attribute__((visibility(\"hidden\")))") endif() endif() endmacro() |