Teach KDECompilerSettings about clang-cl, a mode of Clang compiler that simulates MSVC.
Review Request #128779 - Created Aug. 27, 2016 and updated
By simply using
if(CMAKE_COMPILER_ID STREQUAL "Clang")check is not enough for clang-cl, as it turns on various '-style' flags and omits MSVC's '/style' flags.
With this patch i managed to compile much of KF5 up to konversation and kate.
-std=gnu++98flag is still appended, but i wasn't able to figure out why.
Status: Closed (submitted)
Submitted with commit 4b8e8dcc8856d8f438860783e7641d02d1c05630 by Gleb Popov to branch master.
Hopefully fixed broken tests.
The problem was with
if(CLANG_AS_MSVC)expression. It was treated as string constant by CMake, thus evaluating to true.
I've tested this on FreeBSD, and tests now work.
Revision 3 (+25 -18)