From: Konstantinos Margaritis Date: Wed, 23 Aug 2023 10:21:02 +0000 (+0000) Subject: fix SVE flags detection order #145 X-Git-Tag: vectorscan/5.4.10~1^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ec7b4e77b7a2273099e3dffcf6eaa71de25dbbc;p=thirdparty%2Fvectorscan.git fix SVE flags detection order #145 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bc4c9846..43ce320b 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()