windows: Always set NOMINMAX to remove min/max macros

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
This commit is contained in:
Jesse Natalie 2020-11-18 18:14:41 -08:00
parent 0a7abee60b
commit 852d91edcd
2 changed files with 3 additions and 0 deletions

View File

@ -988,6 +988,7 @@ elif host_machine.system() == 'windows'
'-D_SCL_SECURE_NO_DEPRECATE',
'-D_ALLOW_KEYWORD_MACROS',
'-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
'-DNOMINMAX',
]
else
pre_args += ['-D__MSVCRT_VERSION__=0x0700']

View File

@ -39,7 +39,9 @@
#undef NOMINMAX
#define UNICODE
#else
#undef UNICODE
#include <windows.h>
#define UNICODE
#endif
#include <intrin.h>
#include <cstdint>