]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fix x86 fat binary build
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Sun, 8 Oct 2023 21:42:39 +0000 (00:42 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Sun, 8 Oct 2023 21:42:39 +0000 (00:42 +0300)
cmake/cflags-x86.cmake

index 95485ba76acf0507bd9f0f4b5d0e117501b51fe6..7b9cbf81ae9264b732d767d2c59b6bc6b3056608 100644 (file)
@@ -66,6 +66,7 @@ int main() {
 }" HAVE_SSE42)
 
 # now look for AVX2
+set(CMAKE_REQUIRED_FLAGS "-mavx2")
 CHECK_C_SOURCE_COMPILES("#include <${INTRIN_INC_H}>
 #if !defined(__AVX2__)
 #error no avx2
@@ -77,6 +78,7 @@ int main(){
 }" HAVE_AVX2)
 
 # and now for AVX512
+set(CMAKE_REQUIRED_FLAGS "${SKYLAKE_FLAG}")
 CHECK_C_SOURCE_COMPILES("#include <${INTRIN_INC_H}>
 #if !defined(__AVX512BW__)
 #error no avx512bw
@@ -88,6 +90,7 @@ int main(){
 }" HAVE_AVX512)
 
 # and now for AVX512VBMI
+set(CMAKE_REQUIRED_FLAGS "${ICELAKE_FLAG}")
 CHECK_C_SOURCE_COMPILES("#include <${INTRIN_INC_H}>
 #if !defined(__AVX512VBMI__)
 #error no avx512vbmi