telepathy-qt: cmake: pass -fvisibility-inlines-hidden to the compiler if it 's supported
Dario Freddi
drf at kemper.freedesktop.org
Wed Jul 4 03:24:22 PDT 2012
Module: telepathy-qt
Branch: master
Commit: 4dfce2b1ccca35a93127b8d1cf931c68dd4c6834
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=4dfce2b1ccca35a93127b8d1cf931c68dd4c6834
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date: Tue Jul 3 12:19:58 2012 +0300
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.
---
cmake/modules/TelepathyDefaults.cmake | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cmake/modules/TelepathyDefaults.cmake b/cmake/modules/TelepathyDefaults.cmake
index a7bf77a..ee3ab33 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")
More information about the telepathy-commits
mailing list