From 0ec7b4e77b7a2273099e3dffcf6eaa71de25dbbc Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 23 Aug 2023 10:21:02 +0000 Subject: [PATCH] fix SVE flags detection order #145 --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc4c98466..43ce320b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,11 +187,15 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CROSS_COMPILE) string(FIND "${GNUCC_ARCH}" "sve" POS_SVE) string(FIND "${GNUCC_ARCH}" "sve2" POS_SVE2) string(FIND "${GNUCC_ARCH}" "sve2-bitperm" POS_SVE2_BITPERM) - if (NOT POS_SVE EQUAL 0) + if(NOT POS_SVE2_BITPERM EQUAL 0) + set(SVE2_BITPERM_FOUND 1) + set(SVE2_FOUND 1) set(SVE_FOUND 1) elseif(NOT POS_SVE2 EQUAL 0) set(SVE2_FOUND 1) - elseif(NOT POS_SVE2_BITPERM EQUAL 0) + set(SVE_FOUND 1) + elseif (NOT POS_SVE EQUAL 0) + set(SVE_FOUND 1) set(SVE2_BITPERM_FOUND 1) endif()