From be933ef2241d79558f91796cc5b3a161f72ebf9c Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 19 Oct 2020 00:52:24 +0200 Subject: sync with upstream --- cmake/scripts/common/ArchSetup.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cmake/scripts/common/ArchSetup.cmake') diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 2e1eb12..978a7fa 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake @@ -108,6 +108,21 @@ if(HAVE_INTTYPES_H) list(APPEND SYSTEM_DEFINES -DHAVE_INTTYPES_H=1) endif() +set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") +check_symbol_exists("STATX_BTIME" "linux/stat.h" HAVE_STATX) +if(HAVE_STATX) + check_function_exists("statx" FOUND_STATX_FUNCTION) + if(FOUND_STATX_FUNCTION) + message(STATUS "statx is available") + list(APPEND ARCH_DEFINES "-DHAVE_STATX=1") + else() + message(STATUS "statx flags found but no linkable function : C library too old ?") + endif() +else() + message(STATUS "statx() not found") +endif() +set(CMAKE_REQUIRED_DEFINITIONS "") + find_package(SSE) foreach(_sse SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2) if(${${_sse}_FOUND}) @@ -144,3 +159,5 @@ if(NOT MSVC) add_options(ALL_LANGUAGES DEBUG "-g" "-D_DEBUG") endif() +# set for compile info to help detect binary addons +set(APP_SHARED_LIBRARY_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") -- cgit v1.2.3