Skip to content

Commit

Permalink
Rename pkg_name to model_name
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Oct 6, 2024
1 parent 39a6b3e commit 2bdd9bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(bmigipl Fortran)

include(GNUInstallDirs)

set(model_name gipl_model)
set(bmi_major_version 1)
set(bmi_minor_version 2)
set(bmi_version ${bmi_major_version}.${bmi_minor_version})
Expand Down
24 changes: 11 additions & 13 deletions GIPL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
set(pkg_name gipl_model)

# GIPL model
add_library(${pkg_name} SHARED gipl.f90)
set_target_properties(${pkg_name} PROPERTIES
PUBLIC_HEADER ${CMAKE_Fortran_MODULE_DIRECTORY}/${pkg_name}.mod
add_library(${model_name} SHARED gipl.f90)
set_target_properties(${model_name} PROPERTIES
PUBLIC_HEADER ${CMAKE_Fortran_MODULE_DIRECTORY}/${model_name}.mod
)

# BMI specification
Expand All @@ -15,19 +13,19 @@ set_target_properties(bmif PROPERTIES

# BMI for GIPL model
add_library(${bmigipl_lib} SHARED bmigiplf.f90)
target_link_libraries(${bmigipl_lib} ${pkg_name} bmif)
target_link_libraries(${bmigipl_lib} ${model_name} bmif)
set_target_properties(${bmigipl_lib} PROPERTIES
PUBLIC_HEADER ${CMAKE_Fortran_MODULE_DIRECTORY}/${bmigipl_lib}.mod
)

# Executable main programs
add_executable(run_${pkg_name} main.f90)
target_link_libraries(run_${pkg_name} ${pkg_name})
add_executable(run_bmi${pkg_name} bmi_main.f90)
target_link_libraries(run_bmi${pkg_name} ${bmigipl_lib})
add_executable(run_${model_name} main.f90)
target_link_libraries(run_${model_name} ${model_name})
add_executable(run_bmi${model_name} bmi_main.f90)
target_link_libraries(run_bmi${model_name} ${bmigipl_lib})

install(
TARGETS ${pkg_name}
TARGETS ${model_name}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand All @@ -48,10 +46,10 @@ install(
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(
TARGETS run_${pkg_name}
TARGETS run_${model_name}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(
TARGETS run_bmi${pkg_name}
TARGETS run_bmi${model_name}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

0 comments on commit 2bdd9bb

Please sign in to comment.