From 3574b759160bc4609fb799862e75a33b25c932e7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 10 Aug 2011 10:32:58 +0200 Subject: [PATCH] Simplify the compiler feature check --- Modules/GenerateExportHeader.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 6ee7bd72b..978a92445 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()