Skip to content

Some touchups to reflect that C++20 is now required for Axom - #1957

Merged
kennyweiss merged 7 commits into
developfrom
feature/kweiss/cxx20-touchups
Aug 26, 2026
Merged

Some touchups to reflect that C++20 is now required for Axom#1957
kennyweiss merged 7 commits into
developfrom
feature/kweiss/cxx20-touchups

Conversation

@kennyweiss

@kennyweiss kennyweiss commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

  • This PR updates some docs and config checks to reflect that C++20 is now required for Axom
  • Bonus bugfix -- config.hpp was missing a compiler define for AXOM_USE_MULTIMAT

@kennyweiss kennyweiss self-assigned this Aug 19, 2026
@kennyweiss kennyweiss added Documentation Issues related to documentation maintenance Issues related to code maintenance labels Aug 19, 2026
@kennyweiss
kennyweiss force-pushed the feature/kweiss/cxx20-touchups branch from c7ba710 to 59b0a74 Compare August 20, 2026 00:20
@kennyweiss kennyweiss added this to the FY26 August release milestone Aug 20, 2026
@kennyweiss
kennyweiss force-pushed the feature/kweiss/cxx20-touchups branch from 59b0a74 to 939077f Compare August 21, 2026 17:40
* CMake with a minimum required version of 3.14 for CPU-only and CUDA builds,
* C++ compiler with C++20 support at a minimum
* CMake with a minimum required version of 3.14 for CPU-only builds,
a minimum version of 3.18 when building with CUDA support,

@rhornung67 rhornung67 Aug 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the logic in the top-level CMakeLists.txt file for CUDA builds requiring CMake 3.18+. However, this comment seems to conflict with that: https://github.com/llnl/axom/blob/develop/src/CMakeLists.txt#L13

Is this still an issue; i.e., CUDA build is broken depending on which CMake version is used?

Also, should the choice of CMake min version be done the same way for all cases; i.e., using cmake_minimum_required. We have some comments about not using that. Seems confusing to me how we handle different cases.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair -- I think that the following two statements are true:
(a) the CMake version for CUDA needs to be at least 3.18,
(b) we need to set the cmake_minimum_required to 3.14 at the top of src/CMakeLists.txt for CUDA builds. The cmake_minimum_version function affects the CMake policies and their default values.

Presumably, this will be improved once llnl/blt#769 is merged (?)

@white238 -- should this docs change be rolled back or clarified? Alternatively, should we add a clarifying note to https://github.com/llnl/axom/blob/develop/src/CMakeLists.txt#L13 to reflect the actual CMake requirement for CUDA as opposed to the listed cmake_minimum_version

(Also, please let me know if I got this wrong)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake 3.18 + CUDA + c++20 actually is a failure due to CMake not knowing that CUDA supports C++20 that early in CMake. It was set to this because many moons ago we noticed that it was changing cmake policies based on the cmake_minimum_required and this caused failures. We should reevaluate this at some point.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Should I add a note here or in src/CMakeLists.txt and/or roll back the changes in this paragraph?
Or is it good for now, and we'll revisit in the future?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it passes all CI checks, I say let's go with as is for now. Please make an issue to reevaluate so we don't forget to do that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the following issue for this: #1965

@kennyweiss
kennyweiss force-pushed the feature/kweiss/cxx20-touchups branch from 5ca3ab1 to ea4a596 Compare August 26, 2026 02:21
@kennyweiss
kennyweiss force-pushed the feature/kweiss/cxx20-touchups branch from ea4a596 to fa3ff25 Compare August 26, 2026 18:44
@kennyweiss
kennyweiss merged commit 12695a3 into develop Aug 26, 2026
24 checks passed
@kennyweiss
kennyweiss deleted the feature/kweiss/cxx20-touchups branch August 26, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Issues related to documentation maintenance Issues related to code maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants