Add -D__STDC_LIMIT_MACROS for Visual Studio 2017.

Fixes a problem with `INT64_MAX` etc. being undeclared.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-10-12 21:23:47 +00:00
parent 3a6e4b3c27
commit a078dd2487
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 1 additions and 1 deletions

View File

@ -730,7 +730,7 @@ elseif(MSVC)
string(REGEX REPLACE "/[Ww][^ ]+" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
string(REGEX REPLACE "/[Ww][^ ]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
add_compile_options(/std:c++17)
add_compile_options(/std:c++17 -D__STDC_LIMIT_MACROS)
if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_compile_options(/W4)