-
Notifications
You must be signed in to change notification settings - Fork 10
Update to kokkos5 and c++20 #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
fcfe014
fcc6985
5f6a0b2
843e87d
17c8d59
52a488e
d81f690
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,8 @@ | ||||||||||||||
| cmake_minimum_required(VERSION 3.13) | ||||||||||||||
|
|
||||||||||||||
| # EKAT requires C++20 | ||||||||||||||
| set(CMAKE_CXX_STANDARD 20) | ||||||||||||||
|
Comment on lines
+3
to
+4
|
||||||||||||||
| # EKAT requires C++20 | |
| set(CMAKE_CXX_STANDARD 20) | |
| # EKAT requires C++20 when built as a top-level project | |
| if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) | |
| set(CMAKE_CXX_STANDARD 20) | |
| endif() |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct spelling of “unnanounced” to “unannounced”.
| # implementation will go away in the future, unnanounced (it's an "impl" option => no deprecation). | |
| # implementation will go away in the future, unannounced (it's an "impl" option => no deprecation). |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As written, this reads like an EKAT-level switch, but it only has an effect if EKAT is configuring/building Kokkos from source in the same CMake build (e.g., via add_subdirectory); it won’t change anything when Kokkos is prebuilt and provided via find_package. Consider clarifying that in the option description (or adding a configure-time note) so users aren’t misled into thinking toggling this will reconfigure an externally-provided Kokkos.
| option (Kokkos_ENABLE_IMPL_VIEW_LEGACY "Currently, EKAT is only compatible with Kokkos' legacy view implementation." ON) | |
| option (Kokkos_ENABLE_IMPL_VIEW_LEGACY "Currently, EKAT is only compatible with Kokkos' legacy view implementation. This option only takes effect when EKAT is configuring/building Kokkos from source in the same CMake build (e.g., via add_subdirectory) and does not reconfigure an externally provided Kokkos found via find_package." ON) |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,9 +59,6 @@ add_library(ekat_core | |||||||
| ekat_test_utils.cpp | ||||||||
| ) | ||||||||
|
|
||||||||
|
||||||||
| target_compile_features(ekat_core PUBLIC cxx_std_20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(CMAKE_CXX_STANDARD 20)alone does not strictly require C++20; CMake may still accept older standards if the compiler can’t satisfy it, and may also default to compiler extensions. To truly enforce “require C++20”, also setCMAKE_CXX_STANDARD_REQUIREDtoONand (typically)CMAKE_CXX_EXTENSIONStoOFFnear this block.