MSVC mode with Clang feeds illegal options to the compler
Hi,
Since 2c2ec488, seemingly Windows-MSVC.cmake checks if cl.exe is Clang (ie., Clang simulating MSVC) and gives GCC-style options if so. However, this is all wrong; Clang in MSVC mode will not accept such options and just ignore them:
clang-cl.exe : warning : unknown argument ignored in clang-cl: '-frtti' [-Wunknown-argument] [R:\ade\mysql\obj\libbinlogevents\src\binlogevents_static.vcxproj] clang-cl.exe : warning : unknown argument ignored in clang-cl: '-fexceptions' [-Wunknown-argument] [R:\ade\mysql\obj\libbinlogevents\src\binlogevents_static.vcxproj] clang-cl.exe : warning : unknown argument ignored in clang-cl: '-fno-inline' [-Wunknown-argument] [R:\ade\mysql\obj\libbinlogevents\src\binlogevents_static.vcxproj]
As far as I can tell, the patch is just wrong and should be reverted. Clang as MSVC can accept flags such as /RTC1, /GR and /EHsc just fine.