Test for features, not specific compilers.

This commit is contained in:
Stephen Kelly 2011-08-10 10:26:16 +02:00
parent 4718233a37
commit 3b188c833b
1 changed files with 3 additions and 3 deletions

View File

@ -228,7 +228,9 @@ endfunction()
function(add_compiler_export_flags)
if(NOT CMAKE_COMPILER_IS_GNUCXX OR MINGW)
_test_compiler_hidden_visibility()
if(NOT (USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY) OR MINGW)
return()
endif()
@ -246,8 +248,6 @@ function(add_compiler_export_flags)
endif()
endif()
_test_compiler_hidden_visibility()
if(USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
set (EXTRA_FLAGS "-fvisibility=hidden")