Fixes #758 Always use -DNOMINMAX for MSVC builds
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4944 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: f65b1cfc7e59b8a4e786e75b693a1412588033a2 Former-commit-id: 8cba7ab4cd431546d0db3b2628c364a23f74caef
This commit is contained in:
parent
fd5ace6e31
commit
2920944299
2 changed files with 6 additions and 4 deletions
|
@ -103,8 +103,14 @@ MACRO(ADD_SD_COMPILE_OPTIONS)
|
|||
ADD_DEFINITIONS(-D_SVID_SOURCE -D_BSD_SOURCE -DSHM)
|
||||
|
||||
IF(MSVC)
|
||||
|
||||
# Suppress bothering MSVC warnings
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
|
||||
# Inhibit definition of Macros min(a,b) and max(a,b) for Windows MSVC builds,
|
||||
# as the names conflict with the template functions from standard template library
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
|
||||
ENDIF(MSVC)
|
||||
|
||||
IF(OPTION_FORCE_DEBUG)
|
||||
|
|
|
@ -15,10 +15,6 @@ ADD_PLIB_INCLUDEDIR()
|
|||
ADD_SDL_INCLUDEDIR()
|
||||
|
||||
IF(WIN32)
|
||||
# Inhibit definition of Macros min(a,b) and max(a,b) on Windows
|
||||
# as the names conflict with the template functions from SGMisc.h
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
|
||||
# DLL export stuff under Windows (to avoid .def file)
|
||||
ADD_DEFINITIONS(-DEPHEMERIS_DLL)
|
||||
ENDIF(WIN32)
|
||||
|
|
Loading…
Reference in a new issue