From 0bdded76f68412bb9bfadc736214b1bb6ce4cdcf Mon Sep 17 00:00:00 2001 From: Igor Korsukov Date: Thu, 21 May 2026 10:32:07 +0200 Subject: [PATCH] added check compiler version --- buildscripts/cmake/CheckCompilerVersion.cmake | 11 +++++++++++ buildscripts/cmake/GetPlatformInfo.cmake | 8 ++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 buildscripts/cmake/CheckCompilerVersion.cmake diff --git a/buildscripts/cmake/CheckCompilerVersion.cmake b/buildscripts/cmake/CheckCompilerVersion.cmake new file mode 100644 index 0000000000..513d67854d --- /dev/null +++ b/buildscripts/cmake/CheckCompilerVersion.cmake @@ -0,0 +1,11 @@ + + +function(check_compile_version name min_version hint_message) + if (CMAKE_CXX_COMPILER_ID STREQUAL ${name}) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${min_version}) + message(FATAL_ERROR + "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} is too old; " + "requires ${min_version} or newer. ${hint_message}") + endif() + endif() +endfunction() \ No newline at end of file diff --git a/buildscripts/cmake/GetPlatformInfo.cmake b/buildscripts/cmake/GetPlatformInfo.cmake index 1676d89855..8c51c7b352 100644 --- a/buildscripts/cmake/GetPlatformInfo.cmake +++ b/buildscripts/cmake/GetPlatformInfo.cmake @@ -40,14 +40,12 @@ endif() # based on Qt processor detection code # https://github.com/qt/qtbase/blob/dev/src/corelib/global/qprocessordetection.h -# we only have binary blobs compatible with x86_64, aarch64, and armv7l +# we only have binaries compatible with x86_64 and aarch64 set(archdetect_c_code " #if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__) #if defined(__aarch64__) || defined(__ARM64__) || defined(_M_ARM64) #error cmake_ARCH aarch64 - #elif defined(__ARM_ARCH_7A__) - #error cmake_ARCH armv7l #endif #elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) #error cmake_ARCH x86_64 @@ -83,9 +81,7 @@ string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}") string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}") message(STATUS "Detected CPU Architecture: ${ARCH}") -if(${ARCH} MATCHES "armv7l") - set(ARCH_IS_ARMV7L 1) -elseif(${ARCH} MATCHES "aarch64") +if(${ARCH} MATCHES "aarch64") set(ARCH_IS_AARCH64 1) elseif(${ARCH} MATCHES "x86_64") set(ARCH_IS_X86_64 1)