Review Request 128779: Teach KDECompilerSettings about clang-cl, a mode of Clang compiler that simulates MSVC.

Kevin Funk kfunk at kde.org
Fri Sep 30 07:51:04 UTC 2016



> On Sept. 30, 2016, 6:47 a.m., Kevin Funk wrote:
> > kde-modules/KDECompilerSettings.cmake, line 74
> > <https://git.reviewboard.kde.org/r/128779/diff/1/?file=475491#file475491line74>
> >
> >     `CMAKE_C_SIMULATE_ID STREQUAL "MSVC"` instead of `x${CMAKE_C_SIMULATE_ID} STREQUAL "xMSVC"` should do the job, no?
> >     
> >     There are multiple other places in this patch where `${FOO}` could be replaced by just `FOO`.
> 
> Gleb Popov wrote:
>     > CMAKE_C_SIMULATE_ID STREQUAL "MSVC" instead of x${CMAKE_C_SIMULATE_ID} STREQUAL "xMSVC" should do the job, no?
>     
>     Probably, but this is what CMake does himself: https://gitlab.kitware.com/cmake/cmake/commit/4d52cd36ada014bc3e9a65be06b30966cf29f9a8

Hmm, I thought we've set CMP0054 to NEW behavior by default now, but apparently we didn't. So your style of checking for MSVC is correct, in order to comply with either OLD or NEW behavior of the policy.

+1.


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128779/#review99678
-----------------------------------------------------------


On Aug. 27, 2016, 12:48 p.m., Gleb Popov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128779/
> -----------------------------------------------------------
> 
> (Updated Aug. 27, 2016, 12:48 p.m.)
> 
> 
> Review request for Extra Cmake Modules and kdewin.
> 
> 
> Repository: extra-cmake-modules
> 
> 
> Description
> -------
> 
> 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.
> 
> Known problems: `-std=gnu++98` flag is still appended, but i wasn't able to figure out why.
> 
> 
> Diffs
> -----
> 
>   kde-modules/KDECompilerSettings.cmake 6cecefd 
>   kde-modules/KDEFrameworkCompilerSettings.cmake e41003d 
> 
> Diff: https://git.reviewboard.kde.org/r/128779/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Gleb Popov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20160930/40cf9710/attachment.html>


More information about the Kde-buildsystem mailing list