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()