diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-10 08:32:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-10 08:36:23 (GMT) |
commit | 3574b759160bc4609fb799862e75a33b25c932e7 (patch) | |
tree | 9bcca088dca46ec5a7421f6fc469348e0d825bea | |
parent | c7a937b71258d063bdcd0249b927bcd987ab3273 (diff) | |
download | CMake-3574b759160bc4609fb799862e75a33b25c932e7.zip CMake-3574b759160bc4609fb799862e75a33b25c932e7.tar.gz CMake-3574b759160bc4609fb799862e75a33b25c932e7.tar.bz2 |
Simplify the compiler feature check
-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() |