From c3cbd5256534813cab3db939b6c01d9a2543f2bf Mon Sep 17 00:00:00 2001 From: H0zen Date: Fri, 23 Sep 2016 01:05:52 +0100 Subject: [PATCH] Fix floating point model for VS 2015 (#52) * Fix floating point model for VS 2015 * Fix logic for previous commit. --- cmake/SetDefinitions.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/SetDefinitions.cmake b/cmake/SetDefinitions.cmake index dfe31481..c9caafbd 100644 --- a/cmake/SetDefinitions.cmake +++ b/cmake/SetDefinitions.cmake @@ -65,6 +65,11 @@ if(WIN32) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /MP") endif() + if(CMAKE_GENERATOR MATCHES "Visual Studio 14.*") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:strict") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:strict") + endif() + # Specify the maximum PreCompiled Header memory allocation limit # Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012, hence we need to set an upper limit with /Zm to avoid discrepancies) # (And yes, this is a verified , unresolved bug with MSVC... *sigh*)