From a078dd24871303bd7e1643500a910d69707e8f0a Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 12 Oct 2020 21:23:47 +0000 Subject: [PATCH] Add -D__STDC_LIMIT_MACROS for Visual Studio 2017. Fixes a problem with `INT64_MAX` etc. being undeclared. Signed-off-by: Rafael Kitover --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86b662d0..06797192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)