]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fix SVE flags detection order #145 165/head
authorKonstantinos Margaritis <konma@vectorcamp.gr>
Wed, 23 Aug 2023 10:21:02 +0000 (10:21 +0000)
committerKonstantinos Margaritis <konma@vectorcamp.gr>
Wed, 23 Aug 2023 10:21:02 +0000 (10:21 +0000)
CMakeLists.txt

index bc4c984665f9738544ff86346efeeed0c78cd41f..43ce320b15efa8da83d7c76a3f9634ab4c7645f6 100644 (file)
@@ -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()