Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: disable min() and max() macros in windows.h
Using std::min() and/or std::max() in sources where windows.h has been include fails with error C2589: '(': illegal token on right side of '::' [D:\a\ninja\ninja\build\libninja.vcxproj] error C2062: type 'unknown-type' unexpected [D:\a\ninja\ninja\build\libninja.vcxproj] error C2059: syntax error: ')' [D:\a\ninja\ninja\build\libninja.vcxproj] error C2589: '(': illegal token on right side of '::' [D:\a\ninja\ninja\build\libninja.vcxproj] error C2059: syntax error: ')' [D:\a\ninja\ninja\build\libninja.vcxproj] Avoid this by defining NOMINMAX for windows builds, which causes the windows.h header to skip defining those two macros.
- Loading branch information