[cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
Brad King
brad.king at kitware.com
Tue Nov 17 16:01:58 EST 2015
On 11/17/2015 03:23 PM, Levi Morrison wrote:
> Attached is the patch.
Thanks. In the CompileFeatures test output one can see
Detecting CXX compile features - failed
Then in Tests/CompileFeatures/CMakeFiles/CMakeError.log one can see
the error:
.../Tests/CompileFeatures/CMakeFiles/feature_tests.cxx(32):
error #14: extra text after expected end of preprocessing directive
#if __ICC >= 1500 __INTEL_CXX14_MODE__
^
This should fix it:
-set(Intel15_CXX14 "__ICC >= 1500 __INTEL_CXX14_MODE__")
+set(Intel15_CXX14 "__ICC >= 1500 && __INTEL_CXX14_MODE__")
After that the test runs so you can see the failures.
Also after fixing the above I see in
Tests/CompileFeatures/CMakeFiles/CMakeOutput.log the following:
Detecting CXX [-std=c++14] compiler features compiled with the following output:
...
icpc: command line warning #10159: invalid argument for option '-std'
This is with Intel 15.
More work may be needed to choose the proper flag based on the
version and platform:
https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler
"C++14 features can enabled by using /Qstd=c++14 on Windows
and -std=c++14 on Linux and Mac OS X"
Thanks,
-Brad
More information about the cmake-developers
mailing list