define NOMINMAX in the CMakefile to fix std::min and std::max on MSVC (#1308)

This commit is contained in:
Ben Ashbaugh
2021-08-28 02:21:34 -07:00
committed by GitHub
parent 070f8c0c0e
commit 39fdb462be
6 changed files with 7 additions and 13 deletions

View File

@@ -115,6 +115,8 @@ endif()
if(MSVC)
# Don't warn when using standard non-secure functions.
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
# Fix std::min and std::max handling with windows.harness.
add_compile_definitions(NOMINMAX)
endif()
if( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" )