More VS2015 fixes

This commit is contained in:
James Turner 2016-06-01 22:36:36 +01:00
parent add3a934af
commit 729c9e3faa
2 changed files with 8 additions and 2 deletions

View File

@ -361,10 +361,15 @@ if(WIN32)
# SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}") # SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
# endforeach(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) if (${MSVC_VERSION} GREATER 1599)
set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" ) set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" )
endif (${MSVC_VERSION} GREATER 1599) 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) endif(MSVC)
# assumed on Windows # assumed on Windows

View File

@ -66,6 +66,7 @@
# if _MSC_VER >= 1200 // msvc++ 6.0 up to MSVC2013 # if _MSC_VER >= 1200 // msvc++ 6.0 up to MSVC2013
# if _MSC_VER < 1900 # if _MSC_VER < 1900
# define snprintf _snprintf # define snprintf _snprintf
# define strdup _strdup
# endif # endif
# if _MSC_VER < 1800 # if _MSC_VER < 1800
# define isnan _isnan # define isnan _isnan
@ -81,7 +82,7 @@
# pragma warning(disable: 4786) // identifier was truncated to '255' characters # pragma warning(disable: 4786) // identifier was truncated to '255' characters
# pragma warning(disable: 4244) // conversion from double to float # pragma warning(disable: 4244) // conversion from double to float
# pragma warning(disable: 4305) // # pragma warning(disable: 4305) // truncation from larer type to smaller
# else # else
# error What version of MSVC++ is this? # error What version of MSVC++ is this?