Enable AVX2 code generation on MSVC.

This commit is contained in:
Bartosz Taudul 2024-03-22 22:07:43 +01:00
parent aac38a7deb
commit afceec59aa
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -13,6 +13,10 @@ if (NOT NO_ISA_EXTENSIONS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
endif() endif()
endif() endif()
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:AVX2")
endif()
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY) if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY)