Simplify the compiler feature check
This commit is contained in:
parent
c7a937b712
commit
3574b75916
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue