From c89ffe408d0a3c8118147a2343fef9d958d538da Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 8 Aug 2019 19:26:10 +0200 Subject: [PATCH] CMake: If target arch cannot be detected, don't throw an error This only happens when ccache is improperly in use and -dumpmachine doesn't work. Not on our ARM build platform. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 735e553f7..7e85b40a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -390,12 +390,12 @@ if(NOT MSVC) ) if (RESULT) - message(FATAL_ERROR "Failed to detect target architecture: ${RESULT}") + message(STATUS "Failed to detect target architecture with compiler ${CMAKE_C_COMPILER}: ${RESULT}") endif() - string(REGEX MATCH "([^-]+).*" ARCH_MATCH ${ARCH}) + string(REGEX MATCH "([^-]+).*" ARCH_MATCH "${ARCH}") if (NOT CMAKE_MATCH_1 OR NOT ARCH_MATCH) - message(FATAL_ERROR "Failed to match the target architecture: ${ARCH}") + message(STATUS "Failed to match the target architecture: ${ARCH}") endif() set(ARCH ${CMAKE_MATCH_1}) -- 2.40.0