Skip to content
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

Add manage externals to access MMM-physics repo #2126

Merged
merged 8 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,29 @@ if ( ${USE_IPO} )
endif()



################################################################################
##
## Checkout external repositories using manage_externals
##
################################################################################
message( STATUS "Checking out external repos via manage_externals" )
set( LOG_FILE ${CMAKE_CURRENT_BINARY_DIR}/checkout_externals.log )
execute_process(
COMMAND
${PROJECT_SOURCE_DIR}/tools/manage_externals/checkout_externals --externals ${PROJECT_SOURCE_DIR}/arch/Externals.cfg
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE MANAGE_EXTERNALS_STATUS
OUTPUT_FILE ${LOG_FILE}
ERROR_FILE ${LOG_FILE}
)
if ( ${MANAGE_EXTERNALS_STATUS} AND NOT ${MANAGE_EXTERNALS_STATUS} EQUAL 0 )
message( FATAL_ERROR "Failed to checkout external repos via manage_externals" )
else()
message( STATUS "Finished checking out external repos via manage_externals" )
endif()


################################################################################
##
## Create our flags / defines properties and variables to carry our information
Expand Down
10 changes: 10 additions & 0 deletions arch/Externals.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[MMM-physics]
local_path = ./phys/physics_mmm
protocol = git
repo_url = https://github.com/NCAR/MMM-physics.git
tag = 20240626-MPASv8.2

required = True

[externals_description]
schema_version = 1.0.0
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ LIBTARGET = physics
TARGETDIR = ./

$(LIBTARGET) :
(cd .. && ./tools/manage_externals/checkout_externals --externals ./arch/Externals.cfg)
$(MAKE) $(J) non_nmm ; \
$(AR) $(ARFLAGS) ../main/$(LIBWRFLIB) $(MODULES) $(OBJS) \
$(FIRE_MODULES) $(DIAGNOSTIC_MODULES_EM) $(PHYSMMM_MODULES)
Expand Down
Loading