MSVC 2013+ for 64-bit automatically sets /arch:SSE2 and doesn't recognise te option

This commit is contained in:
Erik Hofman 2016-12-17 10:50:19 +01:00
parent 2f21b582cd
commit 4dde1d365c

View File

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