Skip to content

Commit

Permalink
Do NOT generate headers in the source code
Browse files Browse the repository at this point in the history
This changes the behavior of every subsequent case, which will
pick up the scream_config.h header in the source code before
the one in the binary dir. This can lead to very confusing errors.
  • Loading branch information
jgfouca committed Feb 11, 2025
1 parent 5d9046a commit 12c79dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions physics/scream_cxx_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ macro (EkatConfigFile CONFIG_FILE_IN CONFIG_FILE_C EKAT_CONFIGURE_FILE_F90_FILE)
endmacro (EkatConfigFile)

EkatConfigFile(${SCREAM_HOME}/components/eamxx/src/scream_config.h.in
${SCREAM_HOME}/components/eamxx/src/scream_config.h
${SCREAM_HOME}/components/eamxx/src/scream_config.f)
${CMAKE_CURRENT_BINARY_DIR}/scream_config.h
${CMAKE_CURRENT_BINARY_DIR}/scream_config.f)

include_directories(${SCREAM_HOME}/components/eamxx/src/physics/shoc )
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/shoc/impl)
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/p3 )
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/p3/impl )
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/share )
include_directories(${SCREAM_HOME}/components/eamxx/src )
include_directories(${CMAKE_CURRENT_BINARY_DIR} )
include_directories(${YAKL_HOME}/external )

if (PAM_STANDALONE)
Expand Down
6 changes: 4 additions & 2 deletions physics/scream_cxx_p3_shoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ macro (EkatConfigFile CONFIG_FILE_IN CONFIG_FILE_C EKAT_CONFIGURE_FILE_F90_FILE)
# ECHO_OUTPUT_VARIABLE ${TMP} )
endmacro (EkatConfigFile)


EkatConfigFile(${SCREAM_HOME}/components/eamxx/src/scream_config.h.in
${SCREAM_HOME}/components/eamxx/src/scream_config.h
${SCREAM_HOME}/components/eamxx/src/scream_config.f)
${CMAKE_CURRENT_BINARY_DIR}/scream_config.h
${CMAKE_CURRENT_BINARY_DIR}/scream_config.f)

if (${USE_KOKKOS})
set(Kokkos_ROOT ${INSTALL_SHAREDPATH}/kokkos/build)
Expand All @@ -73,6 +74,7 @@ include_directories(${SCREAM_HOME}/components/eamxx/src/physics/p3 )
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/p3/impl )
include_directories(${SCREAM_HOME}/components/eamxx/src/physics/share )
include_directories(${SCREAM_HOME}/components/eamxx/src )
include_directories(${CMAKE_CURRENT_BINARY_DIR} )
include_directories(${SCREAM_HOME}/components/eam/src/physics/cam )
include_directories(${SCREAM_HOME}/share/timing )
include_directories(${YAKL_HOME}/external )
Expand Down

0 comments on commit 12c79dd

Please sign in to comment.