From 4dde1d365ce480525c2535b2d3c551871501b5be Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sat, 17 Dec 2016 10:50:19 +0100 Subject: [PATCH] MSVC 2013+ for 64-bit automatically sets /arch:SSE2 and doesn't recognise te option --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b3f85d9..0a1bcb18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,10 +383,10 @@ if(WIN32) endif() if(MSVC) - set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP") + set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP /Ox") if(ENABLE_SIMD) - if (X86 OR X86_64) - set(MSVC_FLAGS "${MSVC_FLAGS} /arch:SSE /arch:SSE2 /Ox") + if (X86) + set(MSVC_FLAGS "${MSVC_FLAGS} /arch:SSE /arch:SSE2") endif() endif()