ENH: Upgrade ITK from C++11 to C++14#2563
ENH: Upgrade ITK from C++11 to C++14#2563dzenanz merged 3 commits intoInsightSoftwareConsortium:masterfrom
Conversation
dzenanz
left a comment
There was a problem hiding this comment.
I like rolling version updates like this.
4086301 to
af772d9
Compare
af772d9 to
0b0ca59
Compare
0b0ca59 to
a1df8f7
Compare
|
The requirements in the ITK SW Guide (section Configuring and Building ITK) will need to be updated accordingly, and revise if specificities about the Implementation Language still hold. |
Following pull request InsightSoftwareConsortium/ITK#2563 "ENH: Upgrade ITK from C++11 to C++14" Suggested by Jon Haitz Legarreta Gorroño
Follow-up to commit babb677 "COMP: Enforce building ITK with C++11", Hans Johnson, 19 January 2018
a1df8f7 to
5539f55
Compare
jhlegarreta
left a comment
There was a problem hiding this comment.
I do not have a strong opinion on this, since I do not use ITK in my daily work (and henc eI have not voiced my opinion in discourse), but in the past I have seen some resistance to such changes in some contexts (e.g. people maintaining an application that depends on ITK like to see long time support).
Relevant to this, it may be worthwhile revisiting the deprecation cycle statement in https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/blob/master/SoftwareGuide/Latex/Introduction/Installation.tex#L27. I do not know if this change complies with that. If it does, it is a strong argument for it.
Thanks for your very relevant comment, Jon. Generally speaking there are always users who want to stick to the old standards, and those who prefer the latest and greatest. To me, a move to C++14 feels like a compromise, as it is quite an old standard revision already. C++17, which has quite some more interesting features, seems generally available for a while already. But then the relevant question is of course, whether there are still ITK users who would want to keep up-to-date with the latest ITK version, while requiring an older C++ version. |
|
VS2015 now has some extended support until 2025, while mainstream support ended in March 2020 (more than a year ago). And since VS2017 and 2019 are compatible with VS2015's CRT, I think it is OK to drop support for VS2015 now. |
| # if defined(__clang__) && (__cplusplus < 201402L) | ||
| # error "Apple LLVM < 5.1 (clang < 3.4) is not supported under ITKv5.3" |
There was a problem hiding this comment.
It appears that ITK.macOS.Python (Azure.Mac-1622555791099 Darwin-Build4705-PR2563-CXX_STANDARD-from-11-to-14-Python) fails here, because defined(__clang__) && (__cplusplus < 201402L)
At https://open.cdash.org/viewBuildError.php?buildid=7259248
Any suggestion? Is the compiler properly set to C++14 for ITK.macOS.Python?
There was a problem hiding this comment.
@N-Dekker this may need to be updated:
ITK/Wrapping/Generators/CastXML/CMakeLists.txt
Lines 220 to 224 in 71bb6a9
5539f55 to
a35dcbb
Compare
a35dcbb to
40a795f
Compare
Following pull request InsightSoftwareConsortium/ITK#2563 "ENH: Upgrade ITK from C++11 to C++14" Suggested by Jon Haitz Legarreta Gorroño
C++14 is a small extension over C++11, featuring mainly bug fixes and small improvements: https://en.wikipedia.org/wiki/C%2B%2B14 This commit follows ITK pull request InsightSoftwareConsortium/ITK#2563 commit InsightSoftwareConsortium/ITK@daec0fd "ENH: Upgrade ITK from C++11 to C++14" (1 June 2021).
C++14 is a small extension over C++11, featuring mainly bug fixes and small improvements: https://en.wikipedia.org/wiki/C%2B%2B14 This commit follows ITK pull request InsightSoftwareConsortium/ITK#2563 commit InsightSoftwareConsortium/ITK@daec0fd "ENH: Upgrade ITK from C++11 to C++14" (1 June 2021). Follow-up to pull request #123 commit b84ab47 "ENH: Explicitly set CMAKE_CXX_STANDARD to 11", by Kasper Marstal, 8 March 2019
C++14 is a small extension over C++11, featuring mainly bug fixes and small improvements: https://en.wikipedia.org/wiki/C%2B%2B14 This commit follows ITK pull request InsightSoftwareConsortium/ITK#2563 commit InsightSoftwareConsortium/ITK@daec0fd "ENH: Upgrade ITK from C++11 to C++14" (1 June 2021). Follow-up to pull request #123 commit b84ab47 "ENH: Explicitly set CMAKE_CXX_STANDARD to 11", by Kasper Marstal, 8 March 2019
ITKv5.3 requires at least MSVC version 1910 (Visual Studio 2017) now, so it is no longer useful to check if `MSVC_VERSION GREATER_EQUAL 1600`, or `1800`, or `MSVC_VERSION GREATER 1310`. Checks on `CMAKE_COMPILER_2005` (Visual Studio 2005) are also obsolete. Follow-up to: pull request InsightSoftwareConsortium#2563 commit 4e812d6 "COMP: Require compiler versions that support C++14" (merged on on 3 June 2021)
ITKv5.3 requires at least MSVC version 1910 (Visual Studio 2017) now, so it is no longer useful to check if `MSVC_VERSION GREATER_EQUAL 1600`, or `1800`, or `MSVC_VERSION GREATER 1310`. Checks on `CMAKE_COMPILER_2005` (Visual Studio 2005) are also obsolete. Follow-up to: pull request InsightSoftwareConsortium#2563 commit 4e812d6 "COMP: Require compiler versions that support C++14" (merged on on 3 June 2021)
ITKv5.3 requires at least MSVC version 1910 (Visual Studio 2017) now, so it is no longer useful to check if `MSVC_VERSION GREATER_EQUAL 1600`, or `1800`, or `MSVC_VERSION GREATER 1310`. Checks on `CMAKE_COMPILER_2005` (Visual Studio 2005) are also obsolete. Follow-up to: pull request #2563 commit 4e812d6 "COMP: Require compiler versions that support C++14" (merged on on 3 June 2021)
For Apple, ITKv5.3 ("itkCompilerChecks.cmake") requires at least LLVM
Clang 3.4 or GCC 5.1.
Follow-up to:
pull request InsightSoftwareConsortium#2563
commit 4e812d6
"COMP: Require compiler versions that support C++14"
(merged on 3 June 2021)
ITKv5.3 ("itkCompilerChecks.cmake") requires at least GCC 5.1.
Follow-up to:
pull request InsightSoftwareConsortium#2563
commit 4e812d6
"COMP: Require compiler versions that support C++14"
(merged on 3 June 2021)
GCC 4 support was dropped with pull request InsightSoftwareConsortium#2563 commit 4e812d6 "COMP: Require compiler versions that support C++14", June 3, 2021
Follow-up to pull request InsightSoftwareConsortium#2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
Follow-up to pull request InsightSoftwareConsortium#2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
Follow-up to pull request InsightSoftwareConsortium#2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
Follow-up to pull request InsightSoftwareConsortium#2563 commit daec0fd "ENH: Upgrade ITK from C++11 to C++14"
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
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
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
Follow-up to pull request #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
Follow-up to commit babb677
"COMP: Enforce building ITK with C++11", Hans Johnson (@hjmjohnson), 19 January 2018
Discussion item: https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172