On Thu, Nov 19, 2015 at 9:28 AM, Levi Morrison <morrison.l...@gmail.com> wrote:
> On Thu, Nov 19, 2015 at 8:41 AM, Brad King <brad.k...@kitware.com> wrote:
>>
>> On 11/18/2015 08:00 PM, Levi Morrison wrote:
>> > At a glance this seems to fix the issues in all versions. I will comb
>> > through the output again later when I have a fresh mind.
>>
>> Great!
>>
>> > +if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0)
>> > +  set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
>> > +  set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
>> > +
>> > +  if (NOT CMAKE_CXX_COMPILER_FORCED)
>> > +    if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
>> > +      set(CMAKE_CXX_STANDARD_DEFAULT 98)
>> > +    else()
>> > +      set(CMAKE_CXX_STANDARD_DEFAULT
>> > ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
>> > +    endif()
>> > +  endif()
>> > +endif()
>>
>> Please revise selection of CMAKE_CXX_STANDARD_DEFAULT to look
>> like those here:
>>
>>
>> https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Compiler/GNU-C.cmake;hb=441dba80#l25
>>
>> https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Compiler/GNU-CXX.cmake;hb=441dba80#l37
>
>
> Ah, I was wondering if you would mention that. At the time, at least, it
> always failed. I have since fixed a lot of issues so I will try it again.
>
>>
>> See also the fix to those I just made:
>>
>>  Project: Guess default standard dialect if compiler was forced (#15852)
>>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=441dba80
>>
>> Basically we need to require CMAKE_CXX_STANDARD_COMPUTED_DEFAULT
>> to be computed correctly unless the compiler id was forced, in
>> which case we need to fall back to a memorized table of default
>> versions.  Modules/CMakeCXXCompilerId.cpp.in may also need to be
>> updated to set `dialect_default` correctly for the Intel compiler
>> versions that do not set `__cplusplus` correctly for C++14 mode.
>
>
> Ah… this would explain why the previous stuff always failed. The
> dialect_default almost certainly needs to be updated; thank you.

My latest patch is attached. All tests seem to be working for me on
the compiler versions I have access to. Can you check it for any
glaring errors?

Attachment: 0001-Add-CXX_STANDARD-support-to-Intel-C-compilers.patch
Description: Binary data

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to