From 141e3074845675d37a8c7f7c3efcc09d0ab5158c Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Aug 2019 15:39:02 -0400 Subject: cmConfigure.h: Tell windows.h not to define min/max macros --- Source/cmConfigure.cmake.h.in | 4 ++++ bootstrap | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 19b1cd4..4de1c5d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -26,4 +26,8 @@ #define CM_FALLTHROUGH cmsys_FALLTHROUGH +#if defined(_WIN32) && !defined(NOMINMAX) +# define NOMINMAX +#endif + #endif diff --git a/bootstrap b/bootstrap index 4581239..c7e3945 100755 --- a/bootstrap +++ b/bootstrap @@ -1364,6 +1364,12 @@ cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insall cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\"" cmake_report cmConfigure.h${_tmp} "#define CM_FALLTHROUGH" +if ${cmake_system_mingw}; then + cmake_report cmConfigure.h${_tmp} "#if defined(_WIN32) && !defined(NOMINMAX)" + cmake_report cmConfigure.h${_tmp} "# define NOMINMAX" + cmake_report cmConfigure.h${_tmp} "#endif" +fi + # Regenerate configured headers for h in Configure VersionConfig; do if "${_diff}" cm${h}.h cm${h}.h${_tmp} > /dev/null 2> /dev/null; then -- cgit v0.12