summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-07-03 12:19:58 +0300
committerDario Freddi <dario.freddi@collabora.com>2012-07-04 12:23:18 +0200
commit4dfce2b1ccca35a93127b8d1cf931c68dd4c6834 (patch)
treec410a34625b9ff0e1cc19c8e6fc4d5b5a8ec9215 /cmake
parente3f3bbe052bc7923f32fac293cc8dc2900aea8d4 (diff)
cmake: pass -fvisibility-inlines-hidden to the compiler if it's supported
This flag allows most inline functions to be hidden from the exported symbol table to avoid symbol table pollution.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/TelepathyDefaults.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/modules/TelepathyDefaults.cmake b/cmake/modules/TelepathyDefaults.cmake
index a7bf77a5..ee3ab33f 100644
--- a/cmake/modules/TelepathyDefaults.cmake
+++ b/cmake/modules/TelepathyDefaults.cmake
@@ -47,6 +47,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(VISIBILITY_HIDDEN_FLAGS)
endif (CXX_FVISIBILITY_HIDDEN)
+ CHECK_CXX_ACCEPTS_FLAG("-fvisibility-inlines-hidden" CXX_FVISIBILITY_INLINES_HIDDEN)
+ if (CXX_FVISIBILITY_INLINES_HIDDEN)
+ set(VISIBILITY_HIDDEN_FLAGS "${VISIBILITY_HIDDEN_FLAGS} -fvisibility-inlines-hidden")
+ endif (CXX_FVISIBILITY_INLINES_HIDDEN)
+
CHECK_CXX_ACCEPTS_FLAG("-Wdeprecated-declarations" CXX_DEPRECATED_DECLARATIONS)
if (CXX_DEPRECATED_DECLARATIONS)
set(DEPRECATED_DECLARATIONS_FLAGS "-Wdeprecated-declarations -DTP_QT_DEPRECATED_WARNINGS")