Cannot build CMake with Intel compilers (bootstrap issue after commit 033a4b12)
Hello,
I think bootstrapping CMake with the Intel compilers got broken in commit 033a4b12 (version 3.17.0 and up).
I can understand why the std::invoke_result<decltype(&T::get), T>
check was added but #if
condition seems wrong to me:
#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_if_constexpr))
This seems to enable the C++17 code-path when compiling with C++11, which causes the check to fail with C++11 flags and prevents the bootstrap to find a C++11-enabled compiler:
$ CC=icc CXX=icpc ./bootstrap --parallel=8 --no-system-libs --no-qt-gui -- -DCMAKE_BUILD_TYPE=Release -DCMake_TEST_INSTALL=OFF -DCMAKE_USE_OPENSSL=True
...
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
Best regards,
Rémi
Edited by Rémi Lacroix