[cmake-developers] Add CXX_STANDARD support for Intel C++ compilers

Levi Morrison morrison.levi at gmail.com
Tue Nov 17 18:14:21 EST 2015


On Tue, Nov 17, 2015 at 3:09 PM, Levi Morrison <morrison.levi at gmail.com>
wrote:

> On Tue, Nov 17, 2015 at 2:38 PM, Brad King <brad.king at kitware.com> wrote:
>
>> On 11/17/2015 04:34 PM, Levi Morrison wrote:
>> > On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote:
>> >>> icpc: command line warning #10159: invalid argument for option '-std'
>> >> Hmm. Can you tell me what the value of -std was for that invocation?
>> >
>> > Hazarding a guess I think it might be gnu++14 – can you confirm this?
>>
>> It was `-std=c++14`.  I'm using:
>>
>>  $ icpc --version
>>  icpc (ICC) 15.0.0 20140723
>>
>> According to the `man icpc` page there is no -std=c++14 option.
>>
>> -Brad
>>
>>
> It seems it was added in either 15.0.1 or 15.0.2. I can't find it in the
> documentation. For now I will tell it 15.0.2 which I can confirm works.
>

Version 15.0.0 seems to use `-std=c++1y`.

After I have fixed some more issues I have encountered two tests that I am
stumped on:

  - cxx_right_angle_brackets
  - LinkImplementationFeatureCycle

The first the test has this error:

Tests/CompileFeatures/cxx_right_angle_brackets.cpp(10): error: space
required between adjacent ">" delimiters of nested template argument lists
(">>" is the right shift operator)

In some experimentation with icpc this test passes if -std=c++0x/11/1y/14
is used. When no standard is defined it has this error. How can I see
exactly what flags were used? I am using -VV and do not see the exact
invocation flags.

The second failing test has this for the expect-err>:

286:    expect-err> CMake Error in CMakeLists.txt:
286:    expect-err>   The COMPILE_FEATURES property of target "empty1" was
evaluated when
286:    expect-err>   computing the link implementation, and the
"CXX_STANDARD" was "98" for that
286:    expect-err>   computation.  Computing the COMPILE_FEATURES based on
the link
286:    expect-err>   implementation resulted in a higher "CXX_STANDARD"
"11".  This is not
286:    expect-err>   permitted.  The COMPILE_FEATURES may not both depend
on and be depended on
286:    expect-err>   by the link implementation.

It will actually build successfully instead of error. This indicates to me
I have set something up incorrectly. Any suggestions here?

I have attached my current patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151117/18de3369/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CXX_STANDARD-support-to-Intel-C-compilers.patch
Type: application/octet-stream
Size: 8629 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151117/18de3369/attachment-0001.obj>


More information about the cmake-developers mailing list