Build failure with CMake because of #define min/max in Windows.h
xndc opened this issue · comments
Andy C. commented
ClangBuildAnalyzer pulls in Windows.h at several points, leading to these compilation errors:
src\main.cpp(175): error C2589: '(': illegal token on right side of '::'
src\external\flat_hash_map\flat_hash_map.hpp(1282): error C2589: '(': illegal token on right side of '::'
It looks like you've avoided this in the Visual Studio project by adding a global NOMINMAX define.
This should be done for the CMake build as well. I fixed it locally by adding this to CMakeLists:
target_compile_definitions(ClangBuildAnalyzer PRIVATE "NOMINMAX")
Aras Pranckevičius commented
Should be fixed by #80 (merged into main branch, I'll tag the 1.2.0 release binaries soon)