summaryrefslogtreecommitdiff
path: root/Modules/Compiler/GNU-CXX.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler/GNU-CXX.cmake')
-rw-r--r--Modules/Compiler/GNU-CXX.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 879ab8f..33d6093 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -1,2 +1,12 @@
include(Compiler/GNU)
__compiler_gnu(CXX)
+
+if (WIN32)
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
+ set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fno-keep-inline-dllexport")
+ endif()
+else()
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
+ set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+ endif()
+endif()