diff --git a/components/omega/CMakeLists.txt b/components/omega/CMakeLists.txt index 1f4e1d666d99..3d0c487d4992 100644 --- a/components/omega/CMakeLists.txt +++ b/components/omega/CMakeLists.txt @@ -38,7 +38,7 @@ if (NOT DEFINED PROJECT_NAME) # Collect machine and compiler info from CIME init_standalone_build() - set(CMAKE_CXX_STANDARD 17) # used in E3SM + set(CMAKE_CXX_STANDARD 20) # used in E3SM set(CMAKE_CXX_STANDARD_REQUIRED ON) project(${OMEGA_PROJECT_NAME} diff --git a/components/omega/external/CMakeLists.txt b/components/omega/external/CMakeLists.txt index 0e565a5763ba..76f4f0178b59 100644 --- a/components/omega/external/CMakeLists.txt +++ b/components/omega/external/CMakeLists.txt @@ -144,6 +144,7 @@ if (NOT TARGET cpptrace::cpptrace) # PACKAGE_VERSION (e.g. 2.10.2) from leaking into libdwarf's configure_file unset(PACKAGE_VERSION) option(CPPTRACE_INHERIT_HOST_STANDARD "" ON) + option(CPPTRACE_DISABLE_CXX_20_MODULES "" ON) add_subdirectory( ${OMEGA_SOURCE_DIR}/external/cpptrace ${CMAKE_CURRENT_BINARY_DIR}/external/cpptrace diff --git a/components/omega/src/infra/OmegaKokkos.h b/components/omega/src/infra/OmegaKokkos.h index e31896dbbe0a..4fb467df0f3b 100644 --- a/components/omega/src/infra/OmegaKokkos.h +++ b/components/omega/src/infra/OmegaKokkos.h @@ -57,9 +57,10 @@ template constexpr ArrayDataType checkArrayType() { // determine ArrayMemLoc from Kokkos array type template constexpr ArrayMemLoc findArrayMemLoc() { - if (std::is_same_v) { + if constexpr (std::is_same_v) { return ArrayMemLoc::Both; - } else if (T::is_hostspace) { + } else if constexpr (std::is_same_v) { return ArrayMemLoc::Host; } else { return ArrayMemLoc::Device;