Clang (with GCC syntax) on Windows ignores source language override
If I attempt to compile a .c file as a .cpp, the compiler isn't changed to CMAKE_CXX_COMPILER
(instead it continues to use CMAKE_C_COMPILER
). e.g.
set_source_files_properties(file.c PROPERTIES LANGUAGE CXX)
I then get errors similar to:
C:\PROGRA~1\LLVM\bin\clang.exe ... -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -w -std=c++17 -MD -MT ... -c file.c error: invalid argument '-std=c++17' not allowed with 'C'