Fixed ignoring unknown option '/arch:SSE2' warning while compiling with Visual C++ in 64 bits with SSE3 enabled

This commit is contained in:
Christophe Riccio 2016-05-02 23:32:19 +02:00
parent 1becd76c5f
commit aca1710c5f

View File

@ -120,7 +120,7 @@ elseif(GLM_TEST_ENABLE_SIMD_SSE3)
add_definitions(-msse3)
elseif(GLM_USE_INTEL)
add_definitions(/QxSSE3)
elseif(MSVC)
elseif(MSVC AND NOT CMAKE_CL_64)
add_definitions(/arch:SSE2) # VC doesn't support /arch:SSE3
endif()
elseif(GLM_TEST_ENABLE_SIMD_SSE2)
@ -128,11 +128,9 @@ elseif(GLM_TEST_ENABLE_SIMD_SSE2)
add_definitions(-msse2)
elseif(GLM_USE_INTEL)
add_definitions(/QxSSE2)
elseif(MSVC)
if(NOT CMAKE_CL_64)
elseif(MSVC AND NOT CMAKE_CL_64)
add_definitions(/arch:SSE2)
endif()
endif()
endif()
option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)