ENH: Upgrade ITK from C++14 to C++17#3969
ENH: Upgrade ITK from C++14 to C++17#3969dzenanz merged 4 commits intoInsightSoftwareConsortium:masterfrom
Conversation
099c723 to
0ec405c
Compare
|
Still need to figure out how to upgrade the Python wrapping from C++14 to C++17! Any clue? Looking at Darwin-Build8553-PR3969-CXX_STANDARD-from-14-to-17-Python:
It still says Similarly, Linux-Build8480-PR3969-CXX_STANDARD-from-14-to-17-Python says:
Also still says |
In Wrapping/macro_files/itk_auto_load_submodules.cmake, here set(_castxml_cc_flags ${CMAKE_CXX_FLAGS})
if(CMAKE_CXX_EXTENSIONS)
set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX14_EXTENSION_COMPILE_OPTION}")
else()
set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX14_STANDARD_COMPILE_OPTION}")
endif() |
0ec405c to
561d522
Compare
Thank you @issakomi ! That's very helpful 😃 ! Just force-pushed! |
|
Maybe rebase on new master now that silence PR was merged? |
Follow-up to pull request InsightSoftwareConsortium#2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
Addresses Visual C++ MSVC 19.29.30148.0 (MSVC/14.29.30133) warnings, saying: > warning C4996: 'std::result_of_t': warning STL4014: std::result_of and > std::result_of_t are deprecated in C++17. They are superseded by > std::invoke_result and std::invoke_result_t. You can define > _SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING or > _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received > this warning. Note that C++20 has even removed `std::result_of_t`!
Worked around a GCC bug which appeared when having compiler options "-Wextra" and "-std=c++17", that caused warning messages, like: > itkSizeGTest.cxx: In instantiation of 'Size_Fill_Test::TestBody()::<lambda(auto:23)>: > Modules/Core/Common/test/itkSizeGTest.cxx:126:29: required from here > itkSize.h:70:28: note: 'struct itk::Size<1>' has no user-provided default constructor > itkSize.h:229:40: note: and the implicitly-defined constructor does not initialize 'itk::Size<1>::SizeValueType itk::Size<1>::m_InternalArray [1]' At Azure.fv-az105-696, Linux-Build9859 (GNU 9.4.0): https://open.cdash.org/viewBuildError.php?type=1&buildid=8556515 This compiler bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91070) was fixed with GCC version 10.
561d522 to
44eab79
Compare
44eab79 to
57fd767
Compare
Follow-up to pull request InsightSoftwareConsortium#2563 commit 4e812d6 "COMP: Require compiler versions that support C++14" Resources: C++ reference - Compiler support for C++17 https://en.cppreference.com/w/cpp/compiler_support/17 Note that for C++17 "hardware interference size" support, we would need GCC 12 and Clang 15. C++17 Support in GCC https://gcc.gnu.org/projects/cxx-status.html#cxx17 Announcing: MSVC Conforms to the C++ Standard, Ulzii Luvsanbat, May 7th, 2018 https://devblogs.microsoft.com/cppblog/announcing-msvc-conforms-to-the-c-standard/ C++17 Features Supported by Intel C++ Compiler Classic, Last Updated: 09/12/2020 By Anoop Madhusoodhanan Prabha https://www.intel.com/content/www/us/en/developer/articles/news/c17-features-supported-by-c-compiler.html Xcode clang version record, Masayuki Yamaya, December 14, 2022 https://gist.github.com/yamaya/2924292
57fd767 to
de7124e
Compare
Following ITK pull request InsightSoftwareConsortium/ITK#3969 "ENH: Upgrade ITK from C++14 to C++17" Follow-up to pull request #513 commit d98d9c0 "ENH: Upgrade elastix from C++11 to C++14".
|
Errors:
|
|
There seems to be consensus support in the forum discussion. Please review here too. |
|
Errors:
|
|
@bradking kwrobot is misbehaving recently. Do you have any idea why? Or even better, a fix? |
|
It's more fallout from the GitHub host key change. It should be fixed now. |
|
Hmm, unfortunate that such a big change was made with such a short discussion period. I just discovered this last night. Requiring Xcode 10 consequently drops support for macOS 10.10, 10.11, and 10.12 because Xcode 10 can only run on macOS 10.13. Dropping 10.10 support is not so bad because 10.11 supports all the same Macs as 10.10. I'll retire the Rogue16 nightly cdash build consequently. Dropping 10.11 support though means dropping support for various Mac models because not all Macs that can run 10.11 can run 10.12, as 10.12 dropped support for various models. The newest Xcode that can be run on 10.11 is Xcode 8.2.1, which is what Rogue7 runs. Dropping 10.12 support is not so bad because 10.13 supports all the same Macs as 10.11. I still have customers with older Macs (that are thus stuck on 10.11), and so it's been nice to build and run nightly ITK tests with my corresponding bots. I suppose I don't necessarily need to build on these old OSes though: hopefully an ITK built on a newer macOS/Xcode can still result in an executable that can still run on these older OSes. I imagine that will be less about C++ itself but more about what macOS 10.11's libc++ supports or doesn't. I'll update my 10.13 bot (Rogue22) to reduce the |
Following ITK pull request InsightSoftwareConsortium/ITK#3969 commit InsightSoftwareConsortium/ITK@513507e "ENH: Upgrade ITK from C++14 to C++17" Follow-up to pull request #513 commit d98d9c0 "ENH: Upgrade elastix from C++11 to C++14".
Following ITK pull request InsightSoftwareConsortium/ITK#3969 commit InsightSoftwareConsortium/ITK@513507e "ENH: Upgrade ITK from C++14 to C++17" Follow-up to pull request #513 commit d98d9c0 "ENH: Upgrade elastix from C++11 to C++14".
|
So the Rogue22 bot seems to be building fine. Please keep an eye on it when you start to use new C++17 features. |
Follow-up to pull request #2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
Suggested by Dženan Zukić (@dzenanz) 😃 at #3933 (comment) Still to be discussed.
More information about C++17:
Discussion "Shall we start using C++17 at the master branch?" opened at https://discourse.itk.org/t/shall-we-start-using-c-17-at-the-master-branch/5828