summaryrefslogtreecommitdiff
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-10 10:32:58 +0200
committerStephen Kelly <steveire@gmail.com>2011-08-10 10:36:23 +0200
commit3574b759160bc4609fb799862e75a33b25c932e7 (patch)
tree9bcca088dca46ec5a7421f6fc469348e0d825bea /Modules/GenerateExportHeader.cmake
parentc7a937b71258d063bdcd0249b927bcd987ab3273 (diff)
downloadcmake-3574b759160bc4609fb799862e75a33b25c932e7.tar.gz
Simplify the compiler feature check
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake10
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 6ee7bd72b6..978a924458 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()