diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt index f2b357460591b926c69f2069aea4128d0b0a097d..9d79a3df8f5806ace6b21b03bd6bfa52762e4ac7 100644 --- a/Common/CMakeLists.txt +++ b/Common/CMakeLists.txt @@ -8,3 +8,30 @@ target_sources(test_nearby_extr PRIVATE derived_types.f90 read_snapshot.f90 target_sources(test_set_max_speed PRIVATE derived_types.f90 spher_polyline_area.f90 shpc_open.F90 shpc_close.f90 read_field_indices.F90 read_eddy.f90 shpc_create.f90 write_eddy.f90) +target_sources(test_spher_polyline_area PRIVATE spher_polyline_area.f90) +target_sources(inst_eddies PRIVATE write_eddy.f90 spher_polyline_area.f90 + derived_types.f90 shpc_create.f90 shpc_close.f90 shpc_open.F90 + read_field_indices.F90) + +if(MPI_Fortran_HAVE_F08_MODULE) + target_sources(test_overlap PRIVATE derived_types.f90 read_snapshot.f90 + spher_polyline_area.f90 read_eddy.f90 read_field_indices.F90 write_eddy.f90 + shpc_open.F90 shpc_close.f90) + target_sources(test_read_snapshot PRIVATE derived_types.f90 shpc_create.f90 + read_snapshot.f90 write_eddy.f90 read_eddy.f90 read_field_indices.F90 + shpc_open.F90 shpc_close.f90) + target_sources(test_spher_polygon_area PRIVATE spher_polyline_area.f90) + target_sources(test_weight PRIVATE derived_types.f90) + target_sources(test_read_eddy PRIVATE derived_types.f90 shpc_create.f90 + read_eddy.f90 write_eddy.f90 read_field_indices.F90 shpc_open.F90 + shpc_close.f90) + target_sources(test_send_recv PRIVATE read_field_indices.F90 + read_snapshot.f90 write_eddy.f90 shpc_create.f90 read_eddy.f90 + derived_types.f90 shpc_open.F90 shpc_close.f90) + target_sources(test_get_dispatch_snap PRIVATE read_field_indices.F90 + read_snapshot.f90 shpc_create.f90 write_eddy.f90 read_eddy.f90 + derived_types.f90 shpc_open.F90 shpc_close.f90) + target_sources(eddy_graph PRIVATE shpc_open.F90 shpc_close.f90 + read_field_indices.F90 read_snapshot.f90 spher_polyline_area.f90 + read_eddy.f90 write_eddy.f90 derived_types.f90) +endif() diff --git a/Inst_eddies/CMakeLists.txt b/Inst_eddies/CMakeLists.txt index 5eb8842dd32443ac9d5506a9edeec4371e573d17..c0e53c29e0ce786c6bbb69658e04d776db5997d8 100644 --- a/Inst_eddies/CMakeLists.txt +++ b/Inst_eddies/CMakeLists.txt @@ -1,14 +1,7 @@ -add_executable(inst_eddies inst_eddies.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 local_extrema.f90 - set_max_speed.f90 get_1_outerm.f90 max_speed_contour_ssh.f90 - good_contour.f90 - ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 mean_speed.f90 - inside_4.f90 set_all_outerm.f90 - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 nearby_extr.f90 - get_var.f90 ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90 - write_aux.f90 config.f90 ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90) +add_executable(inst_eddies inst_eddies.f90 local_extrema.f90 set_max_speed.f90 + get_1_outerm.f90 max_speed_contour_ssh.f90 good_contour.f90 mean_speed.f90 + inside_4.f90 set_all_outerm.f90 nearby_extr.f90 get_var.f90 write_aux.f90 + config.f90) target_link_libraries(inst_eddies PRIVATE Contour_531::contour_531 Geometry::geometry NetCDF95::netcdf95 Shapelib_03::shapelib_03 Numer_Rec_95::numer_rec_95 Jumble::jumble NetCDF_Fortran::netcdff) diff --git a/Overlap/CMakeLists.txt b/Overlap/CMakeLists.txt index 78d2b5a632393b8f515d07b5800e9d5049b6f487..7eec5cf8a3ded5f00fb255b4f885ac2995777697 100644 --- a/Overlap/CMakeLists.txt +++ b/Overlap/CMakeLists.txt @@ -2,17 +2,9 @@ if (NOT TARGET EZMPI::ezmpi) find_package(EZMPI REQUIRED CONFIG) endif() -add_executable(eddy_graph eddy_graph.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 get_snapshot.f90 - overlap.f90 dispatch_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 - ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90 recv_snapshot.f90 - candidate_overlap.f90 spher_polygon_area.f90 - ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 weight.f90 - send_snapshot.f90 ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 unit_edge_m.f90) +add_executable(eddy_graph eddy_graph.f90 get_snapshot.f90 overlap.f90 + dispatch_snapshot.f90 recv_snapshot.f90 candidate_overlap.f90 + spher_polygon_area.f90 weight.f90 send_snapshot.f90 unit_edge_m.f90) target_link_libraries(eddy_graph PRIVATE EZMPI::ezmpi Jumble::jumble Shapelib_03::shapelib_03 Contour_531::contour_531 gpc_f Geometry::geometry MPI::MPI_Fortran) diff --git a/Overlap/Tests/CMakeLists.txt b/Overlap/Tests/CMakeLists.txt index 750c5c8acf741ed105cdd5f5c7eb7091a0e6fad3..e4863f02072de0bf5dc5a3307e9cee26bbc45dfd 100644 --- a/Overlap/Tests/CMakeLists.txt +++ b/Overlap/Tests/CMakeLists.txt @@ -1,74 +1,50 @@ # test_overlap add_executable(test_overlap - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 overlap.f90 - ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90 spher_polygon_area.f90 - ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 weight.f90 - ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 - candidate_overlap.f90 ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 + overlap.f90 + spher_polygon_area.f90 + weight.f90 + candidate_overlap.f90 ${CMAKE_CURRENT_LIST_DIR}/test_overlap.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90 unit_edge_m.f90) + unit_edge_m.f90) target_link_libraries(test_overlap Shapelib_03::shapelib_03 Geometry::geometry Contour_531::contour_531 gpc_f Jumble::jumble) # test_read_snapshot add_executable(test_read_snapshot - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 - ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 ${CMAKE_CURRENT_LIST_DIR}/test_read_snapshot.f90 ${PROJECT_SOURCE_DIR}/Tests/write_extr_map.f90 ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90) + ) target_link_libraries(test_read_snapshot NetCDF95::netcdf95 Shapelib_03::shapelib_03 Contour_531::contour_531 gpc_f Jumble::jumble NetCDF_Fortran::netcdff) # test_spher_polygon_area add_executable(test_spher_polygon_area spher_polygon_area.f90 - ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 ${CMAKE_CURRENT_LIST_DIR}/test_spher_polygon_area.f90) target_link_libraries(test_spher_polygon_area Geometry::geometry Shapelib_03::shapelib_03 Jumble::jumble gpc_f) # test_weight add_executable(test_weight weight.f90 - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 ${CMAKE_CURRENT_LIST_DIR}/test_weight.f90) target_link_libraries(test_weight PRIVATE fortrangis::fortranGIS Contour_531::contour_531 Jumble::jumble) # test_read_eddy add_executable(test_read_eddy - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 - ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 ${CMAKE_CURRENT_LIST_DIR}/test_read_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90) + ) target_link_libraries(test_read_eddy Shapelib_03::shapelib_03 Contour_531::contour_531 gpc_f Jumble::jumble) # test_send_recv add_executable(test_send_recv ${CMAKE_CURRENT_LIST_DIR}/test_send_recv.f90 send_snapshot.f90 - recv_snapshot.f90 ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 - ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 - ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 + recv_snapshot.f90 ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90 ${PROJECT_SOURCE_DIR}/Tests/write_extr_map.f90 - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90) + ) target_link_libraries(test_send_recv PRIVATE MPI::MPI_Fortran Shapelib_03::shapelib_03 EZMPI::ezmpi Contour_531::contour_531 gpc_f @@ -78,16 +54,11 @@ target_link_libraries(test_send_recv PRIVATE MPI::MPI_Fortran add_executable(test_get_dispatch_snap ${CMAKE_CURRENT_LIST_DIR}/test_get_dispatch_snap.f90 get_snapshot.f90 dispatch_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90 ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90 recv_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 - ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 + recv_snapshot.f90 ${PROJECT_SOURCE_DIR}/Tests/write_extr_map.f90 - ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90 send_snapshot.f90 - ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 - ${PROJECT_SOURCE_DIR}/Common/shpc_open.F90 - ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90) + send_snapshot.f90 + ) target_link_libraries(test_get_dispatch_snap Shapelib_03::shapelib_03 Jumble::jumble Contour_531::contour_531 EZMPI::ezmpi NetCDF95::netcdf95 gpc_f NetCDF_Fortran::netcdff MPI::MPI_Fortran) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9b24765803d730c23c5264726ddf08db5b6d5cae..d245b11f7a24c5b344d52ae392d790af4ff7a33c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,5 +1,4 @@ add_executable(test_spher_polyline_area - ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 test_spher_polyline_area.f90) target_link_libraries(test_spher_polyline_area Geometry::geometry Contour_531::contour_531 Jumble::jumble)