forked from fmyuan/E3SM
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce hardcoded cmake logic linking ATS
Many of the cmake steps to link ATS were hardcoded in cime_config. Much of this has been removed now that these have been moved to find_package(*) in components/cime/build_model.cmake.
- Loading branch information
Showing
3 changed files
with
11 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,11 @@ | ||
string(APPEND CONFIG_ARGS " ") | ||
string(APPEND CPPDEFS " ") | ||
|
||
# cime/CIME/case_setup.py Now doesn't include userdefined.cmake anymore | ||
# so the following won't work. Move it to universal.cmake temporarily. | ||
|
||
set(AMANZI_TPLS_DIR "$ENV{AMANZI_TPLS_DIR}") | ||
set(ATS_DIR "$ENV{ATS_DIR}") | ||
if (COMP_NAME STREQUAL elm) | ||
if (NOT ${AMANZI_TPLS_DIR} STREQUAL "") | ||
|
||
string(APPEND CMAKE_Fortran_FLAGS " -I${AMANZI_TPLS_DIR}/trilinos-15-1-0/include") | ||
string(APPEND CMAKE_Fortran_FLAGS " -I${AMANZI_TPLS_DIR}/SEACAS/include ") | ||
string(APPEND CMAKE_Fortran_FLAGS " -I${AMANZI_TPLS_DIR}/petsc-3.20/include -I${AMANZI_TPLS_DIR}/pflotran/src ") | ||
if (NOT ${ATS_DIR} STREQUAL "") | ||
string(APPEND CPPDEFS " -DUSE_ATS_LIB ") | ||
string(APPEND CMAKE_Fortran_FLAGS " -I${ATS_DIR}/include ") | ||
endif() | ||
endif() | ||
endif() | ||
if (COMP_NAME STREQUAL cpl) | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -lstdc++") | ||
if (NOT ${AMANZI_TPLS_DIR} STREQUAL "") | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L${AMANZI_TPLS_DIR}/lib") | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L${AMANZI_TPLS_DIR}/trilinos-15-1-0/lib") | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L${AMANZI_TPLS_DIR}/SEACAS/lib ") | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L${AMANZI_TPLS_DIR}/petsc-3.20/lib -L${AMANZI_TPLS_DIR}/pflotran/src ") | ||
if (NOT ${ATS_DIR} STREQUAL "") | ||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -L${ATS_DIR}/lib -lerror_handling -latk -lfunctions -lgeometry -lgeochemutil -lgeochemsolvers -lgeochembase -lgeochemrxns -lgeochemistry -lmesh -lmesh_simple -lmesh_mstk -lmesh_extracted -lmesh_logical -lmesh_factory -ldbg -lwhetstone -ldata_structures -lmesh_functions -loutput -lstate -lsolvers -ltime_integration -loperators -lpks -lchemistry_pk -ltransport -lshallow_water -lats_operators -lats_eos -lats_surf_subsurf -lats_generic_evals -lats_column_integrator -lats_pks -lats_energy_relations -lats_energy -lats_flow_relations -lats_flow -lats_transport -lats_deform -lats_surface_balance -lats_bgc -lats_mpc_relations -lats_mpc -lats_executable -lelm_ats") | ||
endif() | ||
if (NOT ${ATS_DIR} STREQUAL "") | ||
string(APPEND CPPDEFS " -DUSE_ATS_LIB ") | ||
string(APPEND CMAKE_Fortran_FLAGS " -I${ATS_DIR}/include ") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1affbf1
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.
smart changes.