From 5f8335c1e49ce108ef3481863833c98efa00411b Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 2 Jul 2020 23:09:26 +0200 Subject: sync with upstream --- cmake/scripts/common/ArchSetup.cmake | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'cmake/scripts/common/ArchSetup.cmake') diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 07ce6d4..2e1eb12 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake @@ -18,24 +18,7 @@ include(CheckCXXSourceCompiles) include(CheckSymbolExists) include(CheckFunctionExists) include(CheckIncludeFile) - -# Macro to check if a given type exists in a given header -# Arguments: -# header the header to check -# type the type to check for existence -# var the compiler definition to set if type exists -# On return: -# If type was found, the definition is added to SYSTEM_DEFINES -macro(check_type header type var) - check_cxx_source_compiles("#include <${header}> - int main() - { - ${type} s; - }" ${var}) - if(${var}) - list(APPEND SYSTEM_DEFINES -D${var}=1) - endif() -endmacro() +include(CheckTypeSize) # Macro to check if a given builtin function exists # Arguments: @@ -95,17 +78,12 @@ endif() include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) message(STATUS "Core system type: ${CORE_SYSTEM_NAME}") -message(STATUS "Platform: ${PLATFORM}") +message(STATUS "Platform: ${CORE_PLATFORM_NAME}") message(STATUS "CPU: ${CPU}, ARCH: ${ARCH}") message(STATUS "Cross-Compiling: ${CMAKE_CROSSCOMPILING}") message(STATUS "Execute build artefacts on host: ${CORE_HOST_IS_TARGET}") message(STATUS "Depends based build: ${KODI_DEPENDSBUILD}") -check_type(string std::u16string HAVE_STD__U16_STRING) -check_type(string std::u32string HAVE_STD__U32_STRING) -check_type(string char16_t HAVE_CHAR16_T) -check_type(string char32_t HAVE_CHAR32_T) -check_type(stdint.h uint_least16_t HAVE_STDINT_H) check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE) check_symbol_exists(PRIdMAX inttypes.h HAVE_INTTYPES_H) check_builtin("long* temp=0; long ret=__sync_add_and_fetch(temp, 1)" HAS_BUILTIN_SYNC_ADD_AND_FETCH) -- cgit v1.2.3