From e20e503a96778a72aa3afdc6153eb68d10dc6782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 30 Jan 2019 09:22:58 +0100 Subject: [PATCH] Update CMake rules + Add WITH_GCC_VISIBILITY option + Use common tde_setup_gcc_visibility + Add TestBigEndian and tde_setup_largefiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 11 +++++++++++ ConfigureChecks.cmake | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe129f6..275765a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,20 @@ cmake_minimum_required( VERSION 2.8 ) include( FindPkgConfig ) include( CheckCXXSourceCompiles ) +include( CheckSymbolExists ) set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEMacros ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### configure checks ########################## + include( ConfigureChecks.cmake ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 951e55f..f155fe2 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -9,6 +9,16 @@ # ################################################# +##### setup architecture flags ################## + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + # dbus-1 pkg_search_module( DBUS dbus-1 ) if( NOT DBUS_FOUND ) @@ -17,3 +27,8 @@ endif( ) # tqt find_package( TQt ) + +# gcc visibility +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( )