Skip to content

Commit d47430c

Browse files
committed
Merge branch 'tcclevenger/eamxx/updates_needed_for_cpp20' into next (PR #7691)
In C++20 you cannot aggregate initialize a stuct which has a default constructor defined. We shouldn't need these constructors since views themselves have default constructors. Also, allow EAMxx to take a CMAKE_CXX_STANDARD option (default to C++17). Creating this PR so that #7643 won't have to run full CI while I test. [BFB]
2 parents acb983a + 75b6971 commit d47430c

File tree

3 files changed

+1361
-2147
lines changed

3 files changed

+1361
-2147
lines changed

components/eamxx/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ if (SCREAM_CIME_BUILD)
5151
${CMAKE_CURRENT_SOURCE_DIR}/cmake/cime)
5252
endif ()
5353

54-
# We want to use C++17 in EAMxx
55-
set(CMAKE_CXX_STANDARD 17)
54+
if (NOT CMAKE_CXX_STANDARD)
55+
# Default to C++17 in EAMxx
56+
set(CMAKE_CXX_STANDARD 17)
57+
endif()
5658

5759
if (NOT SCREAM_CIME_BUILD)
5860
project(SCREAM CXX C Fortran)

0 commit comments

Comments
 (0)