[cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
Brad King
brad.king at kitware.com
Wed Nov 18 11:45:28 EST 2015
On 11/18/2015 11:20 AM, Levi Morrison wrote:
> I have fixed a smattering of issues and was able to get
> Intel versions 14.0.2 , 15.0.2 and 15.0.3 to pass the
> CompilerFeature tests! Hooray!
Great!
> However, I am stuck on Intel 15.0.0.
On 15.0.0 with -std=1y I get __cplusplus==201103L (rather than
greater) and *not* __INTEL_CXX11_MODE__ or any equivalent for 14.
Therefore the condition
set(Intel15_CXX14 "__ICC >= 1500 && __cplusplus > 201103L")
fails to pass so CMake thinks features using it are not available.
In order for this to work we'll need a way to detect -std=c++1y
mode for this compiler. Perhaps
set(Intel15_CXX14 "__ICC >= 1500 && (__cplusplus > 201103L || (__cplusplus == 201103L && !defined(__INTEL_CXX11_MODE__)))")
?
The conditions for C++11 features may need similar updates
because __INTEL_CXX11_MODE__ is not defined in C++14 mode
but it still supports the C++11 features.
BTW, this line seems to be in the wrong section:
set(_cmake_feature_test_cxx_uniform_initialization "${Intel15_CXX11}")
-Brad
More information about the cmake-developers
mailing list