Add support for Clang targeting MSVC ABI but with GNU-like command line
tried to replace MinGW compiler in the project by specifying clang ones:
cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=C:/dev/tools/LLVM/bin/clang.exe -DCMAKE_CXX_COMPILER=C:/dev/tools/LLVM/bin/clang++.exe -G "CodeBlocks - MinGW Makefiles" C:\Users\amigo421\ClionProjects\hr2
however , cmake tries to use incorrect flags for clang:
clang.exe /nologo /DWIN32 /D_WINDOWS /W3 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FoCMakeFiles\cmTC_f50b2.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_f50b2.dir/ -c C:\Users\amigo421\ClionProjects\hr2\cmake-build-debug\CMakeFiles\CMakeTmp\testCCompiler.c
you see - cmake uses compiler flags from VC toolchain instead of expected GCC one
is it a bug or can be solved by using some additional settings?