aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDE4Internal.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindKDE4Internal.cmake')
-rw-r--r--modules/FindKDE4Internal.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index a1ad01b9..84f4f1b9 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -713,6 +713,12 @@ if (CMAKE_COMPILER_IS_GNUCXX)
MESSAGE(STATUS "Your compiler doesn't support PIE flag")
endif(HAVE_FPIE_SUPPORT)
endif(KDE4_ENABLE_FPIE)
+ # save a little by making local statics not threadsafe
+ check_cxx_compiler_flag(-fno-threadsafe-statics __KDE_HAVE_NO_THREADSAFE_STATICS)
+ if (__KDE_HAVE_NO_THREADSAFE_STATICS)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")
+ endif (__KDE_HAVE_NO_THREADSAFE_STATICS)
+
# visibility support
check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_GCC_VISIBILITY)