From: James Turner Date: Wed, 1 Jun 2016 21:36:36 +0000 (+0100) Subject: More VS2015 fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a48655ed2941a35189d700abd3700e677b656ec9;p=simgear.git More VS2015 fixes --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 76774923..20ad8741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -359,10 +359,15 @@ if(WIN32) # SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}") # endforeach(warning) - set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250 -Dstrdup=_strdup") + set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250") if (${MSVC_VERSION} GREATER 1599) set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" ) endif (${MSVC_VERSION} GREATER 1599) + + if (${MSVC_VERSION} GREATER 1899) + # needed for debug builds with VS2015 + set( MSVC_FLAGS "${MSVC_FLAGS} /bigobj" ) + endif() endif(MSVC) # assumed on Windows diff --git a/simgear/compiler.h b/simgear/compiler.h index 43e1c07d..f6bdc37c 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -66,6 +66,7 @@ # if _MSC_VER >= 1200 // msvc++ 6.0 up to MSVC2013 # if _MSC_VER < 1900 # define snprintf _snprintf +# define strdup _strdup # endif # if _MSC_VER < 1800 # define isnan _isnan @@ -81,7 +82,7 @@ # pragma warning(disable: 4786) // identifier was truncated to '255' characters # pragma warning(disable: 4244) // conversion from double to float -# pragma warning(disable: 4305) // +# pragma warning(disable: 4305) // truncation from larer type to smaller # else # error What version of MSVC++ is this?