Skip to content

Commit

Permalink
Add blending to top rrfs_utl CMakeLists.txt and add install part to e…
Browse files Browse the repository at this point in the history
…ach 4 subdirectory.
  • Loading branch information
donald lippi committed Oct 25, 2023
1 parent ffbfaa1 commit 01748f2
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ add_subdirectory(FV3_ensmean_recenter)
add_subdirectory(bufrsnd)
add_subdirectory(rtma_minmaxtrh)
add_subdirectory(pm)
add_subdirectory(blending)

13 changes: 13 additions & 0 deletions blending/chgres_winds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE F2PY_RESULT
)

# Generate a list of files matching the pattern
file(GLOB CHGRES_WINDS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*cpython*.so")

# Install each file individually
foreach(FILE ${CHGRES_WINDS_FILES})
get_filename_component(FILENAME ${FILE} NAME)
install(
FILES ${FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${FILENAME}
)
endforeach()
20 changes: 17 additions & 3 deletions blending/raymond/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ set(CMAKE_Fortran_COMPILER ifort)
# Set compiler flags
set(FFLAGS "-fopenmp")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FFLAGS}")
set(CFLAGS "-std=c99")

# Add the source file
add_library(raymond MODULE raymond.f)

# Link any necessary libraries
target_link_libraries(raymond PRIVATE iomp5)

# Set the output name of the module
set_target_properties(raymond PROPERTIES OUTPUT_NAME remap)

# Link any necessary libraries
target_link_libraries(raymond PRIVATE iomp5)

# Specify the build directory for f2py
set(F2PY_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})

Expand All @@ -33,3 +34,16 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE F2PY_RESULT
)

# Generate a list of files matching the pattern
file(GLOB RAYMOND_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*cpython*.so")

# Install each file individually
foreach(FILE ${RAYMOND_FILES})
get_filename_component(FILENAME ${FILE} NAME)
install(
FILES ${FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${FILENAME}
)
endforeach()
13 changes: 13 additions & 0 deletions blending/remap_dwinds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE F2PY_RESULT
)

# Generate a list of files matching the pattern
file(GLOB REMAP_DWINDS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*cpython*.so")

# Install each file individually
foreach(FILE ${REMAP_DWINDS_FILES})
get_filename_component(FILENAME ${FILE} NAME)
install(
FILES ${FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${FILENAME}
)
endforeach()
13 changes: 13 additions & 0 deletions blending/remap_scalar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ execute_process(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE F2PY_RESULT
)

# Generate a list of files matching the pattern
file(GLOB REMAP_SCALAR_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*cpython*.so")

# Install each file individually
foreach(FILE ${REMAP_SCALAR_FILES})
get_filename_component(FILENAME ${FILE} NAME)
install(
FILES ${FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME ${FILENAME}
)
endforeach()

0 comments on commit 01748f2

Please sign in to comment.