Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/02/2016 03:32 PM, Levi Morrison wrote: > Brad, here it is a year later and thought I would get around to > finishing this work. Then I discovered you had already completed it! > Thank you so much! > > I now have access to the 2017 Intel C++ compiler; is there anything in > particular you'd like me to check with it? No, thanks. I have it installed and have tested on Linux and Windows. Please proceed with normal usage. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Wed, Dec 2, 2015 at 8:40 AM, Brad King wrote: > On 12/02/2015 10:31 AM, Levi Morrison wrote: >> Hmm. What is the purpose of this module? I verified that indeed my >> changeset somehow breaks this test but I don't even understand what it >> is trying to do. At a glance it looks like even *more* duplication of >> feature detection. Please tell me I'm wrong. > > It re-uses the Modules/Compiler/--FeatureTests.cmake information > to generate a header file that projects can include to check for the > availability of features. The header can then be installed and re-used > by clients of such projects even if they do not use CMake. > > The test checks that those results are consistent with the features detected > by CMake. > > -Brad > Brad, here it is a year later and thought I would get around to finishing this work. Then I discovered you had already completed it! Thank you so much! I now have access to the 2017 Intel C++ compiler; is there anything in particular you'd like me to check with it? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 12/02/2015 10:31 AM, Levi Morrison wrote: > Hmm. What is the purpose of this module? I verified that indeed my > changeset somehow breaks this test but I don't even understand what it > is trying to do. At a glance it looks like even *more* duplication of > feature detection. Please tell me I'm wrong. It re-uses the Modules/Compiler/--FeatureTests.cmake information to generate a header file that projects can include to check for the availability of features. The header can then be installed and re-used by clients of such projects even if they do not use CMake. The test checks that those results are consistent with the features detected by CMake. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Dec 1, 2015 at 11:11 AM, Brad King wrote: > On 12/01/2015 12:47 PM, Levi Morrison wrote: >> I am having trouble reproducing this failure. When I do an >> unrestricted ctest (test everything) it will fail, but if I do >> something like `ctest -VV -R WriteCompilerDetectionHeader` it will >> pass. Any ideas? > > Try ensuring that it is a fresh run of the test: > > $ rm -rf Tests/Module/WriteCompilerDetectionHeader > $ ctest -R Module.WriteCompilerDetectionHeader -V > > The 'RunCMake' tests always run fresh, but many others are > incremental. > > -Brad > Hmm. What is the purpose of this module? I verified that indeed my changeset somehow breaks this test but I don't even understand what it is trying to do. At a glance it looks like even *more* duplication of feature detection. Please tell me I'm wrong. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 12/01/2015 12:47 PM, Levi Morrison wrote: > I am having trouble reproducing this failure. When I do an > unrestricted ctest (test everything) it will fail, but if I do > something like `ctest -VV -R WriteCompilerDetectionHeader` it will > pass. Any ideas? Try ensuring that it is a fresh run of the test: $ rm -rf Tests/Module/WriteCompilerDetectionHeader $ ctest -R Module.WriteCompilerDetectionHeader -V The 'RunCMake' tests always run fresh, but many others are incremental. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Dec 1, 2015 at 7:11 AM, Brad King wrote: > On 11/30/2015 02:13 PM, Levi Morrison wrote: >> Hmm. > > Thanks. I applied it yesterday and merged to 'next' for testing: > > Features: Record standards and features for Intel C++ on UNIX > https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=117d49b8 > > However, it fails the Module.WriteCompilerDetectionHeader test: > > https://open.cdash.org/testDetails.php?test=396604477&build=4124323 > > For now I reverted it from 'next' until we address this failure. > > The WriteCompilerDetectionHeader module and its test need updates > to record support for the Intel compiler features. > > Thanks, > -Brad > I am having trouble reproducing this failure. When I do an unrestricted ctest (test everything) it will fail, but if I do something like `ctest -VV -R WriteCompilerDetectionHeader` it will pass. Any ideas? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/30/2015 02:13 PM, Levi Morrison wrote: > Hmm. Thanks. I applied it yesterday and merged to 'next' for testing: Features: Record standards and features for Intel C++ on UNIX https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=117d49b8 However, it fails the Module.WriteCompilerDetectionHeader test: https://open.cdash.org/testDetails.php?test=396604477&build=4124323 For now I reverted it from 'next' until we address this failure. The WriteCompilerDetectionHeader module and its test need updates to record support for the Intel compiler features. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Mon, Nov 30, 2015 at 11:33 AM, Brad King wrote: > On 11/30/2015 01:18 PM, Levi Morrison wrote: >> 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? > > Good. This hunk: > >> + 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() > > still needs to be revised to account for recent changes: > > Project: Guess default standard dialect if compiler was forced (#15852) > https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=441dba80 > > If CMAKE_CXX_COMPILER_FORCED is set then we now fall back to a guess. > Otherwise it is an error for CMAKE_CXX_STANDARD_COMPUTED_DEFAULT to > not be set. > > Thanks, > -Brad > Hmm. This was done already. Seems I just miscopied the patch again. I don't know how many times I'll make this mistake before I quit doing it :D. 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/30/2015 01:18 PM, Levi Morrison wrote: > 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? Good. This hunk: > + 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() still needs to be revised to account for recent changes: Project: Guess default standard dialect if compiler was forced (#15852) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=441dba80 If CMAKE_CXX_COMPILER_FORCED is set then we now fall back to a guess. Otherwise it is an error for CMAKE_CXX_STANDARD_COMPUTED_DEFAULT to not be set. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Thu, Nov 19, 2015 at 9:28 AM, Levi Morrison wrote: > On Thu, Nov 19, 2015 at 8:41 AM, Brad King 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? 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Thu, Nov 19, 2015 at 8:41 AM, Brad King 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. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
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 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. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Wed, Nov 18, 2015 at 3:34 PM, Levi Morrison wrote: > On Wed, Nov 18, 2015 at 1:06 PM, Brad King wrote: > >> On 11/18/2015 02:32 PM, Levi Morrison wrote: >> > 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. >> >> Great. However, the concern I raised earlier about detecting >> C++11 features in C++14 mode has not been addressed. For example: >> >> set(Intel14_CXX11 "__ICC >= 1400 && __INTEL_CXX11_MODE__") >> >> In C++14 mode this check fails so all the conditional features are >> detected to not exist. Tests/CompileFeatures/CMakeFiles/CMakeOutput.log >> shows: >> >> Detecting CXX [-std=c++1y] compiler features compiled with the following >> output: >> ... >> Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers >> ... >> Detecting CXX [-std=c++11] compiler features compiled with the following >> output: >> ... >> Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers >> >> The "0" and "1" are an internal detection code encoding for whether >> the feature exists according to the feature test specified. We see >> that the C++14 mode does not think the feature exists. This is not >> the case for GNU or other compilers. >> >> I'm not sure why this doesn't cause problems in the test, but the >> conditions need to be fixed to avoid this problem. __INTEL_CXX11_MODE__ >> only tells us that we are in *exactly* C++11 mode and so is not >> reliable for detecting C++11 features in C++14 mode. >> >> -Brad >> >> > My builds don't seem to be attempting this: > > Detecting CXX [-std=c++1y] compiler features compiled with the following >> output > > > You are getting this out of the CMakeFiles/CMakeOutput.log, correct? > I'm not sure why that was happening – I get this in my output now. I am experimenting with definitions that look like this: set(DETECT_CXX11 "((__cplusplus >= 201103L) || > defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))") > set(DETECT_CXX14 "((__cplusplus >= 201103L) && > !defined(__INTEL_CXX11_MODE__))") I then use these with __ICC checks as appropriate: set(Intel15_CXX14 "__ICC >= 1500 && ${DETECT_CXX14}") 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. 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Wed, Nov 18, 2015 at 1:06 PM, Brad King wrote: > On 11/18/2015 02:32 PM, Levi Morrison wrote: > > 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. > > Great. However, the concern I raised earlier about detecting > C++11 features in C++14 mode has not been addressed. For example: > > set(Intel14_CXX11 "__ICC >= 1400 && __INTEL_CXX11_MODE__") > > In C++14 mode this check fails so all the conditional features are > detected to not exist. Tests/CompileFeatures/CMakeFiles/CMakeOutput.log > shows: > > Detecting CXX [-std=c++1y] compiler features compiled with the following > output: > ... > Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers > ... > Detecting CXX [-std=c++11] compiler features compiled with the following > output: > ... > Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers > > The "0" and "1" are an internal detection code encoding for whether > the feature exists according to the feature test specified. We see > that the C++14 mode does not think the feature exists. This is not > the case for GNU or other compilers. > > I'm not sure why this doesn't cause problems in the test, but the > conditions need to be fixed to avoid this problem. __INTEL_CXX11_MODE__ > only tells us that we are in *exactly* C++11 mode and so is not > reliable for detecting C++11 features in C++14 mode. > > -Brad > > My builds don't seem to be attempting this: Detecting CXX [-std=c++1y] compiler features compiled with the following > output You are getting this out of the CMakeFiles/CMakeOutput.log, correct? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/18/2015 02:32 PM, Levi Morrison wrote: > 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. Great. However, the concern I raised earlier about detecting C++11 features in C++14 mode has not been addressed. For example: set(Intel14_CXX11 "__ICC >= 1400 && __INTEL_CXX11_MODE__") In C++14 mode this check fails so all the conditional features are detected to not exist. Tests/CompileFeatures/CMakeFiles/CMakeOutput.log shows: Detecting CXX [-std=c++1y] compiler features compiled with the following output: ... Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers ... Detecting CXX [-std=c++11] compiler features compiled with the following output: ... Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers The "0" and "1" are an internal detection code encoding for whether the feature exists according to the feature test specified. We see that the C++14 mode does not think the feature exists. This is not the case for GNU or other compilers. I'm not sure why this doesn't cause problems in the test, but the conditions need to be fixed to avoid this problem. __INTEL_CXX11_MODE__ only tells us that we are in *exactly* C++11 mode and so is not reliable for detecting C++11 features in C++14 mode. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Wed, Nov 18, 2015 at 9:45 AM, Brad King 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
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 -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 4:14 PM, Levi Morrison wrote: > On Tue, Nov 17, 2015 at 3:09 PM, Levi Morrison > wrote: > >> On Tue, Nov 17, 2015 at 2:38 PM, Brad King wrote: >> >>> On 11/17/2015 04:34 PM, Levi Morrison wrote: >>> > On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote: >>> >>> icpc: command line warning #10159: invalid argument for option '-std' >>> >> Hmm. Can you tell me what the value of -std was for that invocation? >>> > >>> > Hazarding a guess I think it might be gnu++14 – can you confirm this? >>> >>> It was `-std=c++14`. I'm using: >>> >>> $ icpc --version >>> icpc (ICC) 15.0.0 20140723 >>> >>> According to the `man icpc` page there is no -std=c++14 option. >>> >>> -Brad >>> >>> >> It seems it was added in either 15.0.1 or 15.0.2. I can't find it in the >> documentation. For now I will tell it 15.0.2 which I can confirm works. >> > > Version 15.0.0 seems to use `-std=c++1y`. > > After I have fixed some more issues I have encountered two tests that I am > stumped on: > > - cxx_right_angle_brackets > - LinkImplementationFeatureCycle > > The first the test has this error: > > Tests/CompileFeatures/cxx_right_angle_brackets.cpp(10): error: space > required between adjacent ">" delimiters of nested template argument lists > (">>" is the right shift operator) > > In some experimentation with icpc this test passes if -std=c++0x/11/1y/14 > is used. When no standard is defined it has this error. How can I see > exactly what flags were used? I am using -VV and do not see the exact > invocation flags. > > The second failing test has this for the expect-err>: > > 286:expect-err> CMake Error in CMakeLists.txt: > 286:expect-err> The COMPILE_FEATURES property of target "empty1" was > evaluated when > 286:expect-err> computing the link implementation, and the > "CXX_STANDARD" was "98" for that > 286:expect-err> computation. Computing the COMPILE_FEATURES based > on the link > 286:expect-err> implementation resulted in a higher "CXX_STANDARD" > "11". This is not > 286:expect-err> permitted. The COMPILE_FEATURES may not both depend > on and be depended on > 286:expect-err> by the link implementation. > > It will actually build successfully instead of error. This indicates to me > I have set something up incorrectly. Any suggestions here? > > I have attached my current patch. > 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! However, I am stuck on Intel 15.0.0. In Intel-CXX-FeatureTests the entry for cxx_return_type_deduction is giving me issues. If I put it into the section just above it, the test will fail when it should pass. If I try to exclude it by only doing stuff not less than 15.0.2 then it now suddenly passes but the test suite expects it to fail. Any ideas on this one? I'm going to install Intel 16.0 in the meantime and try to get its support working. 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 3:09 PM, Levi Morrison wrote: > On Tue, Nov 17, 2015 at 2:38 PM, Brad King wrote: > >> On 11/17/2015 04:34 PM, Levi Morrison wrote: >> > On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote: >> >>> icpc: command line warning #10159: invalid argument for option '-std' >> >> Hmm. Can you tell me what the value of -std was for that invocation? >> > >> > Hazarding a guess I think it might be gnu++14 – can you confirm this? >> >> It was `-std=c++14`. I'm using: >> >> $ icpc --version >> icpc (ICC) 15.0.0 20140723 >> >> According to the `man icpc` page there is no -std=c++14 option. >> >> -Brad >> >> > It seems it was added in either 15.0.1 or 15.0.2. I can't find it in the > documentation. For now I will tell it 15.0.2 which I can confirm works. > Version 15.0.0 seems to use `-std=c++1y`. After I have fixed some more issues I have encountered two tests that I am stumped on: - cxx_right_angle_brackets - LinkImplementationFeatureCycle The first the test has this error: Tests/CompileFeatures/cxx_right_angle_brackets.cpp(10): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator) In some experimentation with icpc this test passes if -std=c++0x/11/1y/14 is used. When no standard is defined it has this error. How can I see exactly what flags were used? I am using -VV and do not see the exact invocation flags. The second failing test has this for the expect-err>: 286:expect-err> CMake Error in CMakeLists.txt: 286:expect-err> The COMPILE_FEATURES property of target "empty1" was evaluated when 286:expect-err> computing the link implementation, and the "CXX_STANDARD" was "98" for that 286:expect-err> computation. Computing the COMPILE_FEATURES based on the link 286:expect-err> implementation resulted in a higher "CXX_STANDARD" "11". This is not 286:expect-err> permitted. The COMPILE_FEATURES may not both depend on and be depended on 286:expect-err> by the link implementation. It will actually build successfully instead of error. This indicates to me I have set something up incorrectly. Any suggestions here? I have attached my current patch. 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 2:38 PM, Brad King wrote: > On 11/17/2015 04:34 PM, Levi Morrison wrote: > > On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote: > >>> icpc: command line warning #10159: invalid argument for option '-std' > >> Hmm. Can you tell me what the value of -std was for that invocation? > > > > Hazarding a guess I think it might be gnu++14 – can you confirm this? > > It was `-std=c++14`. I'm using: > > $ icpc --version > icpc (ICC) 15.0.0 20140723 > > According to the `man icpc` page there is no -std=c++14 option. > > -Brad > > It seems it was added in either 15.0.1 or 15.0.2. I can't find it in the documentation. For now I will tell it 15.0.2 which I can confirm works. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/17/2015 04:34 PM, Levi Morrison wrote: > On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote: >>> icpc: command line warning #10159: invalid argument for option '-std' >> Hmm. Can you tell me what the value of -std was for that invocation? > > Hazarding a guess I think it might be gnu++14 – can you confirm this? It was `-std=c++14`. I'm using: $ icpc --version icpc (ICC) 15.0.0 20140723 According to the `man icpc` page there is no -std=c++14 option. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 2:07 PM, Levi Morrison wrote: > 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 >> > > Hmm. Can you tell me what the value of -std was for that invocation? > > Hazarding a guess I think it might be gnu++14 – can you confirm this? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
> > 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 > Hmm. Can you tell me what the value of -std was for that invocation? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/17/2015 03:57 PM, Levi Morrison wrote: > Also, it is worth pointing out that some of the features are partially > supported in earlier versions, but in the FeatureTests.cmake I put it > only for the first version that claims complete compatibility > - is that the correct action? Yes, thanks. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
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 -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 1:23 PM, Levi Morrison wrote: > > I'm not sure how to edit Tests/CompileFeatures/CMakeLists.txt, though. >> > I don't even know what half of this file is trying to accomplish. >> > It seems like it is pure duplication of work; these checks are saying >> > EXPECT_C_STATIC_ASSERT=1 if some compiler conditions are true but >> > I already encoded that information in Intel-CXX-FeatureTests.cmake >> >> It is duplicated because the test memorizes the answers to make sure >> the detection works for known cases. The EXPECT_... definitions >> encode the expected results for the HAVE_... definitions that are >> set by the $ generator expressions. This >> way the test ensures that the detection works and its results >> propagate all the way through genex evaluation correctly. >> >> > In any case, it seems I still need to update something >> >> Please post the patch so far so we can look at it to see what may be >> missing. Once this part works then it may activate the real parts >> of the CompileFeatures test and lead you to the portions of that test >> that need to be filled in for the Intel compiler. >> >> Thanks, >> -Brad >> >> > Attached is the patch. I'm unsure if the `&& __INTEL_CXX11_MODE__` parts > are needed. I was hoping I'd find out when running tests. > Also, it is worth pointing out that some of the features are partially supported in earlier versions, but in the FeatureTests.cmake I put it only for the first version that claims complete compatibility – is that the correct action? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
> > > I'm not sure how to edit Tests/CompileFeatures/CMakeLists.txt, though. > > I don't even know what half of this file is trying to accomplish. > > It seems like it is pure duplication of work; these checks are saying > > EXPECT_C_STATIC_ASSERT=1 if some compiler conditions are true but > > I already encoded that information in Intel-CXX-FeatureTests.cmake > > It is duplicated because the test memorizes the answers to make sure > the detection works for known cases. The EXPECT_... definitions > encode the expected results for the HAVE_... definitions that are > set by the $ generator expressions. This > way the test ensures that the detection works and its results > propagate all the way through genex evaluation correctly. > > > In any case, it seems I still need to update something > > Please post the patch so far so we can look at it to see what may be > missing. Once this part works then it may activate the real parts > of the CompileFeatures test and lead you to the portions of that test > that need to be filled in for the Intel compiler. > > Thanks, > -Brad > > Attached is the patch. I'm unsure if the `&& __INTEL_CXX11_MODE__` parts are needed. I was hoping I'd find out when running tests. 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/17/2015 01:13 PM, Levi Morrison wrote: > I have updated Modules/Compiler/Intel-CXX-FeatureTests.cmake. Great. > I'm not sure how to edit Tests/CompileFeatures/CMakeLists.txt, though. > I don't even know what half of this file is trying to accomplish. > It seems like it is pure duplication of work; these checks are saying > EXPECT_C_STATIC_ASSERT=1 if some compiler conditions are true but > I already encoded that information in Intel-CXX-FeatureTests.cmake It is duplicated because the test memorizes the answers to make sure the detection works for known cases. The EXPECT_... definitions encode the expected results for the HAVE_... definitions that are set by the $ generator expressions. This way the test ensures that the detection works and its results propagate all the way through genex evaluation correctly. > In any case, it seems I still need to update something Please post the patch so far so we can look at it to see what may be missing. Once this part works then it may activate the real parts of the CompileFeatures test and lead you to the portions of that test that need to be filled in for the Intel compiler. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 11:13 AM, Levi Morrison wrote: > On Tue, Nov 17, 2015 at 6:50 AM, Brad King wrote: > >> On 11/16/2015 03:14 PM, Levi Morrison wrote: >> > It seems my attachments are getting scrubbed or something? >> >> It was just that one message that was missing one. This one worked. >> >> >> How did you test these? For full testing we need the CMake test >> >> suite to pass with the Intel compilers. In particular, tests with >> >> 'CompileFeatures' in their name cover this functionality. >> > >> > I was able to build and use (or not use as appropriately) C++11 and >> > C++14 for a given project I already have. >> >> Good start. >> >> > What is the proper way to do run the test suite for a given compiler? >> >> One can run the entire test suite like this: >> >> export CC=icc CXX=icpc >> mkdir CMake-intel-tests && cd CMake-intel-tests >> cmake ../CMake >> -DCMake_TEST_EXTERNAL_CMAKE="/path/to/main/CMake-build/bin" >> make >> > > :D Funnily enough > Oops, didn't finish that phrase. Can't remember what it was supposed to say anymore. Guess it wasn't that funny. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Tue, Nov 17, 2015 at 6:50 AM, Brad King wrote: > On 11/16/2015 03:14 PM, Levi Morrison wrote: > > It seems my attachments are getting scrubbed or something? > > It was just that one message that was missing one. This one worked. > > >> How did you test these? For full testing we need the CMake test > >> suite to pass with the Intel compilers. In particular, tests with > >> 'CompileFeatures' in their name cover this functionality. > > > > I was able to build and use (or not use as appropriately) C++11 and > > C++14 for a given project I already have. > > Good start. > > > What is the proper way to do run the test suite for a given compiler? > > One can run the entire test suite like this: > > export CC=icc CXX=icpc > mkdir CMake-intel-tests && cd CMake-intel-tests > cmake ../CMake -DCMake_TEST_EXTERNAL_CMAKE="/path/to/main/CMake-build/bin" > make > :D Funnily enough > ctest > > Or on the last step run just specific tests: > > ctest -R CompileFeatures -V > > I just tried the patch locally. While these tests do pass, the compile > features are not actually recorded. What is missing is a file called > > Modules/Compiler/Intel-CXX-FeatureTests.cmake > > that records how to use the preprocessor to test for the version of the > compiler that adds each feature. See these for some examples: > > Modules/Compiler/GNU-CXX-FeatureTests.cmake > Modules/Compiler/MSVC-CXX-FeatureTests.cmake > > Then the Tests/CompileFeatures/CMakeLists.txt file also needs to be > updated to enable testing for versions of the Intel compiler that are > expected to work. > > Building the feature table may not be a trivial task. It is one of > the reasons no one has added support yet. If you have access to > versions 12, 13, 14, 15, then running the test suite with each of > those will help verify the table correctness. > > -Brad > > I have updated Modules/Compiler/Intel-CXX-FeatureTests.cmake. It took a while :D I'm not sure how to edit Tests/CompileFeatures/CMakeLists.txt, though. I don't even know what half of this file is trying to accomplish. It seems like it is pure duplication of work; these checks are saying EXPECT_C_STATIC_ASSERT=1 if some compiler conditions are true but I already encoded that information in Intel-CXX-FeatureTests.cmake, didn't I? In any case, it seems I still need to update something because after editing that file I am unable to use `target_compile_features(sometarget PRIVATE cxx_nullptr)`, etc. I get the message: CMake Error at CMakeLists.txt:7 (target_compile_features): target_compile_features no known features for CXX compiler "Intel" version 15.0.3.20150407. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/16/2015 03:14 PM, Levi Morrison wrote: > It seems my attachments are getting scrubbed or something? It was just that one message that was missing one. This one worked. >> How did you test these? For full testing we need the CMake test >> suite to pass with the Intel compilers. In particular, tests with >> 'CompileFeatures' in their name cover this functionality. > > I was able to build and use (or not use as appropriately) C++11 and > C++14 for a given project I already have. Good start. > What is the proper way to do run the test suite for a given compiler? One can run the entire test suite like this: export CC=icc CXX=icpc mkdir CMake-intel-tests && cd CMake-intel-tests cmake ../CMake -DCMake_TEST_EXTERNAL_CMAKE="/path/to/main/CMake-build/bin" make ctest Or on the last step run just specific tests: ctest -R CompileFeatures -V I just tried the patch locally. While these tests do pass, the compile features are not actually recorded. What is missing is a file called Modules/Compiler/Intel-CXX-FeatureTests.cmake that records how to use the preprocessor to test for the version of the compiler that adds each feature. See these for some examples: Modules/Compiler/GNU-CXX-FeatureTests.cmake Modules/Compiler/MSVC-CXX-FeatureTests.cmake Then the Tests/CompileFeatures/CMakeLists.txt file also needs to be updated to enable testing for versions of the Intel compiler that are expected to work. Building the feature table may not be a trivial task. It is one of the reasons no one has added support yet. If you have access to versions 12, 13, 14, 15, then running the test suite with each of those will help verify the table correctness. -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
> > How did you test these? For full testing we need the CMake test >> suite to pass with the Intel compilers. In particular, tests with >> 'CompileFeatures' in their name cover this functionality. > > > I was able to build and use (or not use as appropriately) C++11 and C++14 > for a given project I already have. What is the proper way to do run the > test suite for a given compiler? > I ran this: CC=icc CXX=icpc ctest -j 12 -R CompileFeatures --verbose Here is the tail end of the results: The following tests passed: CompileFeatures RunCMake.CompileFeatures 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 1130.73 sec However, it unclear based on the output if the CC and CXX defines did anything. Is this the correct way to switch compilers when running the tests? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Mon, Nov 16, 2015 at 11:31 AM, Brad King wrote: > On 11/16/2015 12:21 PM, Levi Morrison wrote: > > I found and fixed a mistake in my macro. > > Great. Did you mean to attach the corrected version? > It seems my attachments are getting scrubbed or something? > I have now tested this on Intel 12, 13, 14, and 15 for both C++11 and > C++14. > > How did you test these? For full testing we need the CMake test > suite to pass with the Intel compilers. In particular, tests with > 'CompileFeatures' in their name cover this functionality. I was able to build and use (or not use as appropriately) C++11 and C++14 for a given project I already have. What is the proper way to do run the test suite for a given compiler? 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/16/2015 12:21 PM, Levi Morrison wrote: > I found and fixed a mistake in my macro. Great. Did you mean to attach the corrected version? > I have now tested this on Intel 12, 13, 14, and 15 for both C++11 and C++14. How did you test these? For full testing we need the CMake test suite to pass with the Intel compilers. In particular, tests with 'CompileFeatures' in their name cover this functionality. > What do I do now to get it reviewed and committed? Posting here is sufficient. This thread is the review ;) Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Mon, Nov 16, 2015 at 9:54 AM, Levi Morrison wrote: > Note that the Intel compiler may be tricky because it simulates MSVC >> on Windows and GNU elsewhere. The needed options may vary across >> platforms, and our tables need to reflect this. > > > See the attached patch; will the if UNIX check will suffice for now? > I found and fixed a mistake in my macro. I have now tested this on Intel 12, 13, 14, and 15 for both C++11 and C++14. It is complete as I know how to make it be. What do I do now to get it reviewed and committed? -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
> > Note that the Intel compiler may be tricky because it simulates MSVC > on Windows and GNU elsewhere. The needed options may vary across > platforms, and our tables need to reflect this. See the attached patch; will the if UNIX check will suffice for now? 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On 11/16/2015 11:46 AM, Levi Morrison wrote: > should I bound this by versions that exist? For instance, there is no > Intel 17.0 so should I limit this? No. For other compilers we just assume newer versions are at least as capable as previous versions and are compatible with the needed options and such. See Modules/Compiler/GNU-CXX.cmake for an example of how the settings vary based on compiler version. Note that the Intel compiler may be tricky because it simulates MSVC on Windows and GNU elsewhere. The needed options may vary across platforms, and our tables need to reflect this. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
On Mon, Nov 16, 2015 at 9:42 AM, Brad King wrote: > HI Levi, > > Thanks for coming forward to work on this! > > On 11/16/2015 11:34 AM, Levi Morrison wrote: > > Why is MSVC doing a version check around the CXX_STANDARD_DEFAULT? > > The version check delimits the set of versions for which CMake > has recorded knowledge of C++ feature availability. So… should I bound this by versions that exist? For instance, there is no Intel 17.0 so should I limit this? > Should I be doing this for Intel as well? > > I also don't know the complete version numbers for some of these > > things, such as how far back they support `-std=c++98`. I only > > have Intel compilers from version 12.0 and up. Should I guard > > the CMAKE_CXX98_STANDARD_COMPILE_OPTION around 12 since that's > > all I have available to test? > > Yes. If you cannot reliably fill out the information for older > versions then just leave them out. Others can fill them in if > needed. This is what was done for MSVC and GNU compilers. > Thank you. I'll work on this and have another patch ready. -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
HI Levi, Thanks for coming forward to work on this! On 11/16/2015 11:34 AM, Levi Morrison wrote: > Why is MSVC doing a version check around the CXX_STANDARD_DEFAULT? The version check delimits the set of versions for which CMake has recorded knowledge of C++ feature availability. > Should I be doing this for Intel as well? > I also don't know the complete version numbers for some of these > things, such as how far back they support `-std=c++98`. I only > have Intel compilers from version 12.0 and up. Should I guard > the CMAKE_CXX98_STANDARD_COMPILE_OPTION around 12 since that's > all I have available to test? Yes. If you cannot reliably fill out the information for older versions then just leave them out. Others can fill them in if needed. This is what was done for MSVC and GNU compilers. Thanks, -Brad -- 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
Re: [cmake-developers] Add CXX_STANDARD support for Intel C++ compilers
Message was rejected – retrying. On Mon, Nov 16, 2015 at 9:31 AM, Levi Morrison wrote: > First off, this is my first attempt at a CMake contribution ever, so > please be gentle! > > I have a few questions about my patch, though: > > Why is MSVC doing a version check around the CXX_STANDARD_DEFAULT? Should > I be doing this for Intel as well? > > I also don't know the complete version numbers for some of these things, > such as how far back they support `-std=c++98`. I only have Intel compilers > from version 12.0 and up. Should I guard the > CMAKE_CXX98_STANDARD_COMPILE_OPTION around 12 since that's all I have > available to test? > > Anyway, I appreciate any feedback. Please let me know what I should change. > -- 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