[PATCH] Move duplicate Windows-specific compiler flags to a common CMake variable

Timur Iskhodzhanov timurrrr at google.com
Thu May 29 13:35:42 PDT 2014


A-ha, so you suggest to use -isystem rather than -I for gtest, right?
The system headers should be fine out of the box already?
(Please note I don't use clang-cl there now)

2014-05-30 0:26 GMT+04:00 Reid Kleckner <rnk at google.com>:

> Clang suppresses all warnings in system headers, which are put onto the
> include search path with the -isystem flag.  In clang-cl, we consider
> anything in %INCLUDE% to be a system header by passing it with -isystem to
> clang -cc1.
>
>
> On Thu, May 29, 2014 at 11:41 AM, Timur Iskhodzhanov <timurrrr at google.com>
> wrote:
>
>> Can you elaborate on the -isystem approach? I'm not sure I know what
>> you're taking about.
>> 29 мая 2014 г. 21:03 пользователь "Reid Kleckner" <rnk at google.com>
>> написал:
>>
>> drive by nits that were already there
>>>
>>> ================
>>> Comment at: cmake/Modules/AddCompilerRT.cmake:129
>>> @@ -126,1 +128,3 @@
>>>  if(MSVC)
>>> +  # MSVC system headers and gtest use a lot of deprecated stuff.
>>> +  list(APPEND COMPILER_RT_TEST_CFLAGS
>>> ----------------
>>> Can we use -isystem to suppress these?  Does -D_CRT_SECURE_NO_WARNINGS
>>> solve this problem?
>>>
>>> ================
>>> Comment at: cmake/Modules/AddCompilerRT.cmake:137
>>> @@ +136,3 @@
>>> +
>>> +  # We should teach clang to understand more pragmas.
>>> +  list(APPEND COMPILER_RT_TEST_CFLAGS
>>> ----------------
>>> ditto, this can be handled with -isystem.
>>>
>>> http://reviews.llvm.org/D3952
>>>
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140530/2b34b245/attachment.html>


More information about the llvm-commits mailing list