flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Fix Clang-Cl compile on Windows

Open 06393993 opened this issue 2 years ago • 0 comments

Introduce a MSVC_LIKE variable in the CMake scripts, set that variable to true only if the compiler is either MSVC or tries to emulate the MSVC command line, and test that variable when setting compiler arguments.

Tested with cmake .. -G Ninja -DCMAKE_C_COMPILER:PATH="clang-cl.exe" -DCMAKE_CXX_COMPILER:PATH="clang-cl.exe" -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_CPP17=ON

06393993 avatar May 16 '22 23:05 06393993