]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
don't fail if mtune does not return a valid configuration
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Thu, 2 Dec 2021 21:09:34 +0000 (23:09 +0200)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Thu, 2 Dec 2021 21:09:34 +0000 (23:09 +0200)
CMakeLists.txt

index 10829fb82109b8b5fd21f09047b7ea506b3493e5..9c58fd465f8c2920cfeb41f3482230705684a69e 100644 (file)
@@ -181,12 +181,12 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CROSS_COMPILE)
         INPUT_FILE /dev/null
         RESULT_VARIABLE GNUCC_TUNE_TEST)
     if (NOT GNUCC_TUNE_TEST EQUAL 0)
-        message(SEND_ERROR "Something went wrong determining gcc tune: -mtune=${GNUCC_ARCH} not valid")
+        message(WARNING "Something went wrong determining gcc tune: -mtune=${GNUCC_ARCH} not valid, falling back to -mtune=native")
         set(TUNE_FLAG native)
     else()
         set(TUNE_FLAG ${GNUCC_ARCH})
+        message(STATUS "gcc will tune for ${GNUCC_ARCH}")
     endif()
-    message(STATUS "gcc will tune for ${GNUCC_ARCH}")
 elseif (CMAKE_COMPILER_IS_CLANG AND NOT CROSS_COMPILE)
     message(STATUS "clang will tune for ${TUNE_FLAG}")
     if (ARCH_IA32 OR ARCH_X86_64)