summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
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")