From afceec59aa542e95b7d9def610c4862893c5df3c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 22 Mar 2024 22:07:43 +0100 Subject: [PATCH] Enable AVX2 code generation on MSVC. --- cmake/config.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/config.cmake b/cmake/config.cmake index 37e3414a..bca382b4 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -13,6 +13,10 @@ if (NOT NO_ISA_EXTENSIONS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") endif() endif() + if(WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:AVX2") + endif() endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY)