On Wed, Nov 18, 2015 at 9:45 AM, Brad King <brad.k...@kitware.com> wrote:
> 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 > > It seems I uploaded an older patch. I am ssh'ing into a system to do these runs, so I missed the copy to my local machine and uploaded the older copy. Silly mistake. Regardless though, it seems you hit the nail on the head with `!defined(__INTEL_CXX11_MODE__)`. It turns out I was able to simplify the complicated expression to: set(Intel15_CXX14 "__cplusplus >= 201103L && !defined(__INTEL_CXX11_MODE__)" ) I don't think I would have thought about `!defined(__INTEL_CXX11_MODE__)`. After some other tweaks I am able to get Intel C++ compiler versions 12.1.4 13.0.1, 14.0.0, 14.0.2, 15.0.0, 15.0.2, 15.0.3 to work! Both tests found by `ctest -R CompileFeatures -VV` pass. I also checked that it worked on a small project I am working on, which it did. What's next?
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