From 01bed117c91b8e9d657501c6f701cb579c124ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 1 Feb 2019 17:15:04 +0100 Subject: Use common GCC visibility test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 9a394bb261926a6ef9e8a5155c2ebe70261affe3) --- ConfigureChecks.cmake | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 4f6752e15..7105bdef6 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -128,29 +128,9 @@ endif( ) ##### check for gcc visibility support ######### -# FIXME -# This should check for [T]Qt3 visibility support if( WITH_GCC_VISIBILITY ) - if( NOT UNIX ) - tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" ) - endif( NOT UNIX ) - tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" ) - check_cxx_source_compiles( " - #include - #ifndef __KDE_HAVE_GCC_VISIBILITY - #error gcc visibility is not enabled in tdelibs - #endif - int main() { return 0; } " - HAVE_GCC_VISIBILITY - ) - tde_restore( CMAKE_REQUIRED_INCLUDES ) - if( NOT HAVE_GCC_VISIBILITY ) - tde_message_fatal( "gcc visibility support was requested, but not supported in tdelibs" ) - endif( NOT HAVE_GCC_VISIBILITY ) - set( __KDE_HAVE_GCC_VISIBILITY 1 ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + tde_setup_gcc_visibility( ) endif( ) -- cgit v1.2.1