Skip to content

Commit 0ec7b4e

Browse files
author
Konstantinos Margaritis
committed
fix SVE flags detection order #145
1 parent 68db36f commit 0ec7b4e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,15 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CROSS_COMPILE)
187187
string(FIND "${GNUCC_ARCH}" "sve" POS_SVE)
188188
string(FIND "${GNUCC_ARCH}" "sve2" POS_SVE2)
189189
string(FIND "${GNUCC_ARCH}" "sve2-bitperm" POS_SVE2_BITPERM)
190-
if (NOT POS_SVE EQUAL 0)
190+
if(NOT POS_SVE2_BITPERM EQUAL 0)
191+
set(SVE2_BITPERM_FOUND 1)
192+
set(SVE2_FOUND 1)
191193
set(SVE_FOUND 1)
192194
elseif(NOT POS_SVE2 EQUAL 0)
193195
set(SVE2_FOUND 1)
194-
elseif(NOT POS_SVE2_BITPERM EQUAL 0)
196+
set(SVE_FOUND 1)
197+
elseif (NOT POS_SVE EQUAL 0)
198+
set(SVE_FOUND 1)
195199
set(SVE2_BITPERM_FOUND 1)
196200
endif()
197201

0 commit comments

Comments
 (0)