mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Fixed GLM test '/fp:fast' and '/Za' command-line options are incompatible
This commit is contained in:
parent
630f0840f2
commit
a1b4bdbf03
@ -31,6 +31,8 @@ if(NOT GLM_TEST_ENABLE)
|
||||
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
|
||||
endif()
|
||||
|
||||
option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)
|
||||
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
|
||||
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
||||
@ -68,7 +70,21 @@ endif()
|
||||
|
||||
option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
|
||||
|
||||
if(NOT GLM_TEST_ENABLE_LANG_EXTENSIONS)
|
||||
if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
|
||||
if(GLM_TEST_ENABLE_FAST_MATH)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-ffast-math)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(/fp:fast)
|
||||
endif()
|
||||
elseif(NOT GLM_TEST_ENABLE_FAST_MATH)
|
||||
if(MSVC)
|
||||
add_definitions(/fp:precise)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32))
|
||||
add_definitions(/Za)
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"))
|
||||
@ -122,21 +138,6 @@ elseif(GLM_TEST_ENABLE_SIMD_SSE2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)
|
||||
if(GLM_TEST_ENABLE_FAST_MATH)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-ffast-math)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(/fp:fast)
|
||||
endif()
|
||||
elseif(NOT GLM_TEST_ENABLE_FAST_MATH)
|
||||
if(MSVC)
|
||||
add_definitions(/fp:precise)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
#add_definitions(-S)
|
||||
#add_definitions(-s)
|
||||
|
@ -100,6 +100,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
||||
- Fixed sign with signed integer function on non-x86 architecture
|
||||
- Fixed strict aliasing warnings #473
|
||||
- Fixed missing vec1 overload to length2 and distance2 functions #431
|
||||
- Fixed GLM test '/fp:fast' and '/Za' command-line options are incompatible
|
||||
|
||||
##### Deprecation:
|
||||
- Removed GLM_FORCE_SIZE_FUNC define
|
||||
|
Loading…
Reference in New Issue
Block a user