From b04ded680c9c7d01a6be16105615411ad4e6aae9 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 29 Jan 2025 19:40:07 +0100 Subject: [PATCH] Require AVX2 for vkdoom and tell the compiler to use it (no point in supporting CPU's older than Haswell as it predates Vulkan) --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72b3f70e6..17b0808b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,7 +184,11 @@ endif() # Set up flags for MSVC if (MSVC) # /we4715 turns "'function' : not all control paths return a value" as it should be!!!!!!!!one1! - set( CMAKE_CXX_FLAGS "/MP /we4715 ${CMAKE_CXX_FLAGS}" ) + set(CMAKE_CXX_FLAGS "/MP /we4715 ${CMAKE_CXX_FLAGS}") + if(X64) + # CPUs that don't support AVX2 are going to be too slow to run this properly anyway + set(CMAKE_CXX_FLAGS "/arch:AVX2 ${CMAKE_CXX_FLAGS}") + endif(X64) endif (MSVC) # Set up flags for GCC