summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-10 08:26:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-08-10 08:26:16 (GMT)
commit3b188c833b1d349dd610d5f5c929804d34b1967f (patch)
tree0c9a8621ec5c07b9c0d5db426a73a374012b71f6 /Modules/GenerateExportHeader.cmake
parent4718233a37f0180b1716db31df090a3f649e854a (diff)
downloadCMake-3b188c833b1d349dd610d5f5c929804d34b1967f.zip
CMake-3b188c833b1d349dd610d5f5c929804d34b1967f.tar.gz
CMake-3b188c833b1d349dd610d5f5c929804d34b1967f.tar.bz2
Test for features, not specific compilers.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 659b32a..73ed5e2 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -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")