From 52ac447e8490ac38ab9a06700b99f6f7ba97cf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 14 Feb 2019 14:42:21 +0100 Subject: Use common CMake tests. 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 ef810c0ec929279a168a5fa472be5660ce76a25f) --- CMakeLists.txt | 1 + ConfigureChecks.cmake | 24 +++--------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1cf089..1e10d5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ include( CheckIncludeFile ) include( CheckIncludeFiles ) include( CheckLibraryExists ) include( CheckFunctionExists ) +include( CheckSymbolExists ) include( CheckCSourceCompiles ) include( CheckCXXSourceCompiles ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 4d71bba..6f7035e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -16,34 +16,16 @@ tde_setup_architecture_flags( ) include(TestBigEndian) test_big_endian(WORDS_BIGENDIAN) +tde_setup_largefiles( ) + ##### check for gcc 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 ) - 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( WITH_GCC_VISIBILITY ) -##### gettext - -if( BUILD_TRANSLATIONS ) - include( FindGettext ) - if( GETTEXT_FOUND ) - set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} - CACHE FILEPATH "path to msgfmt executable" ) - endif( GETTEXT_FOUND ) - - if( NOT MSGFMT_EXECUTABLE ) - tde_message_fatal( "msgfmt is required but was not found on your system." ) - endif( NOT MSGFMT_EXECUTABLE ) -endif( BUILD_TRANSLATIONS ) - - #### check for headers check_include_file( "sys/select.h" HAVE_SYS_SELECT_H ) -- cgit v1.2.1