Skip to content

Commit

Permalink
fix build order for fortran modules
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Feb 17, 2024
1 parent 59d891a commit b96f4fa
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cmake/macros/SundialsAddLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ macro(sundials_add_f2003_library target)
SOURCES ${sundials_add_f2003_library_SOURCES}
OBJECT_LIBRARIES ${sundials_add_f2003_library_OBJECT_LIBRARIES}
LINK_LIBRARIES
${sundials_add_f2003_library_LINK_LIBRARIES}
PUBLIC ${_clib_name} # depend on the c library
${sundials_add_f2003_library_LINK_LIBRARIES}
INCLUDE_DIRECTORIES
${sundials_add_f2003_library_INCLUDE_DIRECTORIES}
${_includes}
Expand Down
5 changes: 1 addition & 4 deletions src/sunlinsol/band/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsolband_mod
SOURCES
fsunlinsol_band_mod.f90 fsunlinsol_band_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
LINK_LIBRARIES
PUBLIC sundials_fsunmatrixband_mod
PUBLIC sundials_fsunmatrixband_mod sundials_fcore_mod
OUTPUT_NAME
sundials_fsunlinsolband_mod
VERSION
Expand Down
5 changes: 1 addition & 4 deletions src/sunlinsol/dense/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsoldense_mod
SOURCES
fsunlinsol_dense_mod.f90 fsunlinsol_dense_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
LINK_LIBRARIES
PUBLIC sundials_fsunmatrixdense_mod
PUBLIC sundials_fsunmatrixdense_mod sundials_fcore_mod
OUTPUT_NAME
sundials_fsunlinsoldense_mod
VERSION
Expand Down
5 changes: 1 addition & 4 deletions src/sunlinsol/klu/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ sundials_add_f2003_library(sundials_fsunlinsolklu_mod
SOURCES
fsunlinsol_klu_mod.f90 fsunlinsol_klu_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
LINK_LIBRARIES
PUBLIC sundials_fsunmatrixsparse_mod
PUBLIC sundials_fsunmatrixsparse_mod sundials_fcore_mod
OUTPUT_NAME
sundials_fsunlinsolklu_mod
VERSION
Expand Down
5 changes: 1 addition & 4 deletions src/sunlinsol/lapackdense/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ sundials_add_f2003_library(sundials_fsunlinsollapackdense_mod
SOURCES
fsunlinsol_lapackdense_mod.f90 fsunlinsol_lapackdense_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
LINK_LIBRARIES
PUBLIC sundials_fsunmatrixdense_mod
PUBLIC sundials_fsunmatrixdense_mod sundials_fcore_mod
OUTPUT_NAME
sundials_fsunlinsollapackdense_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunlinsol/pcg/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolpcg_mod
fsunlinsol_pcg_mod.f90 fsunlinsol_pcg_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunlinsolpcg_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunlinsol/spbcgs/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspbcgs_mod
fsunlinsol_spbcgs_mod.f90 fsunlinsol_spbcgs_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunlinsolspbcgs_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunlinsol/spfgmr/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspfgmr_mod
fsunlinsol_spfgmr_mod.f90 fsunlinsol_spfgmr_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunlinsolspfgmr_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunlinsol/spgmr/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolspgmr_mod
fsunlinsol_spgmr_mod.f90 fsunlinsol_spgmr_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunlinsolspgmr_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunlinsol/sptfqmr/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunlinsolsptfqmr_mod
fsunlinsol_sptfqmr_mod.f90 fsunlinsol_sptfqmr_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunlinsolsptfqmr_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunmatrix/band/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixband_mod
fsunmatrix_band_mod.f90 fsunmatrix_band_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunmatrixband_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunmatrix/dense/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixdense_mod
fsunmatrix_dense_mod.f90 fsunmatrix_dense_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunmatrixdense_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunmatrix/sparse/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sundials_add_f2003_library(sundials_fsunmatrixsparse_mod
fsunmatrix_sparse_mod.f90 fsunmatrix_sparse_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunmatrixsparse_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunnonlinsol/fixedpoint/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ sundials_add_f2003_library(sundials_fsunnonlinsolfixedpoint_mod
fsunnonlinsol_fixedpoint_mod.f90 fsunnonlinsol_fixedpoint_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunnonlinsolfixedpoint_mod
VERSION
Expand Down
1 change: 0 additions & 1 deletion src/sunnonlinsol/newton/fmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ sundials_add_f2003_library(sundials_fsunnonlinsolnewton_mod
fsunnonlinsol_newton_mod.f90 fsunnonlinsol_newton_mod.c
LINK_LIBRARIES
PUBLIC sundials_fcore_mod
OBJECT_LIBRARIES
OUTPUT_NAME
sundials_fsunnonlinsolnewton_mod
VERSION
Expand Down

0 comments on commit b96f4fa

Please sign in to comment.