diff --git a/Inst_eddies/CMakeLists.txt b/Inst_eddies/CMakeLists.txt
index b67461b0d740ec4e12b97de8634e1ea27c6fb0cd..680f9799bfbc960ae272c1b29a1411e68c4740b6 100644
--- a/Inst_eddies/CMakeLists.txt
+++ b/Inst_eddies/CMakeLists.txt
@@ -1,11 +1,11 @@
 add_executable(inst_eddies inst_eddies.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90 local_extrema.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 ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90
+  good_contour.f90 ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90
   mean_speed.f90 inside_4.f90 set_all_outerm.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90 nearby_extr.f90 get_var.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90 write_aux.f90 config.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)
 
 target_include_directories(inst_eddies PRIVATE ${fortrangis_INCLUDE_DIR})
 
diff --git a/Inst_eddies/Tests/CMakeLists.txt b/Inst_eddies/Tests/CMakeLists.txt
index 49229f54a086366a6e277522cb101cd2bdd85ff8..41b1b52b792f19de2b3d654e2e77362176452728 100644
--- a/Inst_eddies/Tests/CMakeLists.txt
+++ b/Inst_eddies/Tests/CMakeLists.txt
@@ -1,12 +1,12 @@
 # test_get_1_outerm
 
 add_executable(test_get_1_outerm good_contour.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 get_1_outerm.f90
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 get_1_outerm.f90
+  ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_get_1_outerm.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90)
+  ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90
+  ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90)
 
 target_link_libraries(test_get_1_outerm geometry NetCDF95::netcdf95 shapelib_03
   contour_531 nr_util jumble NetCDF_Fortran::NetCDF_Fortran)
@@ -17,13 +17,13 @@ target_include_directories(test_get_1_outerm PRIVATE
 # test_set_all_outerm
 
 add_executable(test_set_all_outerm
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 set_all_outerm.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 set_all_outerm.f90
   local_extrema.f90 get_1_outerm.f90 good_contour.f90
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90 nearby_extr.f90
+  ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 nearby_extr.f90
   get_var.f90 ${CMAKE_CURRENT_LIST_DIR}/test_set_all_outerm.f90
-  config.f90 ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90)
+  config.f90 ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90
+  ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90)
 
 target_link_libraries(test_set_all_outerm geometry NetCDF95::netcdf95
   numer_rec_95 shapelib_03 contour_531 jumble nr_util
@@ -65,7 +65,7 @@ target_include_directories(test_mean_speed PRIVATE
 # test_max_speed_contour_ssh
 
 add_executable(test_max_speed_contour_ssh
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 max_speed_contour_ssh.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 max_speed_contour_ssh.f90
   get_var.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_max_speed_contour_ssh.f90)
 
@@ -78,13 +78,13 @@ target_include_directories(test_max_speed_contour_ssh PRIVATE
 # test_nearby_extr
 
 add_executable(test_nearby_extr nearby_extr.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_nearby_extr.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90)
+  ${PROJECT_SOURCE_DIR}/Common/read_snapshot.f90
+  ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90
+  ${PROJECT_SOURCE_DIR}/Common/read_field_indices.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_open.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90)
 
 target_link_libraries(test_nearby_extr NetCDF95::netcdf95 shapelib_03
   contour_531 jumble nr_util NetCDF_Fortran::NetCDF_Fortran ezmpi
@@ -97,7 +97,7 @@ target_include_directories(test_nearby_extr PRIVATE
 
 add_executable(test_local_extrema local_extrema.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_local_extrema.f90
-  ${CMAKE_SOURCE_DIR}/Tests/write_extr_map.f90)
+  ${PROJECT_SOURCE_DIR}/Tests/write_extr_map.f90)
 
 target_link_libraries(test_local_extrema NetCDF95::netcdf95 nr_util
   jumble NetCDF_Fortran::NetCDF_Fortran)
@@ -105,16 +105,16 @@ target_link_libraries(test_local_extrema NetCDF95::netcdf95 nr_util
 # test_set_max_speed
 
 add_executable(test_set_max_speed
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 set_max_speed.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90 set_max_speed.f90
   good_contour.f90 max_speed_contour_ssh.f90 mean_speed.f90
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90 inside_4.f90
+  ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90 inside_4.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_set_max_speed.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90)
+  ${PROJECT_SOURCE_DIR}/Common/shpc_open.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90
+  ${PROJECT_SOURCE_DIR}/Common/read_field_indices.f90
+  ${PROJECT_SOURCE_DIR}/Common/read_eddy.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90
+  ${PROJECT_SOURCE_DIR}/Common/write_eddy.f90)
 
 target_link_libraries(test_set_max_speed geometry numer_rec_95
   NetCDF95::netcdf95 shapelib_03 contour_531 jumble nr_util
diff --git a/Overlap/CMakeLists.txt b/Overlap/CMakeLists.txt
index 68c2325708f0cd7103b3c1229ab3446e05648334..afa29bcd993701c137d59417d36014dacfb11ef5 100644
--- a/Overlap/CMakeLists.txt
+++ b/Overlap/CMakeLists.txt
@@ -1,16 +1,16 @@
 add_executable(eddy_graph eddy_graph.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90 get_snapshot.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_open.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90 get_snapshot.f90
   overlap.f90 dispatch_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90 recv_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
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90
+  ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90
   weight.f90 send_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 unit_edge_m.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)
 
 target_include_directories(eddy_graph PRIVATE ${fortrangis_INCLUDE_DIR})
 
diff --git a/Overlap/Tests/CMakeLists.txt b/Overlap/Tests/CMakeLists.txt
index 7730d578c147d2697c9983bdf984de1fd98e0fa0..5beac004a47b7d95b5373ae9f5e295d9eb3f43f2 100644
--- a/Overlap/Tests/CMakeLists.txt
+++ b/Overlap/Tests/CMakeLists.txt
@@ -1,16 +1,16 @@
 # test_overlap
 
 add_executable(test_overlap
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90 overlap.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90 spher_polygon_area.f90
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90 weight.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
-  candidate_overlap.f90 ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
+  ${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
+  ${PROJECT_SOURCE_DIR}/Common/shpc_create.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_overlap.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90 unit_edge_m.f90)
+  ${PROJECT_SOURCE_DIR}/Common/shpc_open.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90 unit_edge_m.f90)
 
 target_link_libraries(test_overlap shapelib_03 geometry contour_531
   gpc_f ezmpi nr_util jumble MPI::MPI_Fortran)
@@ -20,17 +20,17 @@ target_include_directories(test_overlap PRIVATE ${fortrangis_INCLUDE_DIR})
 # test_read_snapshot
 
 add_executable(test_read_snapshot
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
+  ${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
-  ${CMAKE_SOURCE_DIR}/Tests/write_extr_map.f90
+  ${PROJECT_SOURCE_DIR}/Tests/write_extr_map.f90
   ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.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 contour_531 gpc_f ezmpi nr_util jumble
@@ -42,7 +42,7 @@ target_include_directories(test_read_snapshot PRIVATE
 # test_spher_polygon_area
 
 add_executable(test_spher_polygon_area spher_polygon_area.f90
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_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 shapelib_03
@@ -54,7 +54,7 @@ target_include_directories(test_spher_polygon_area PRIVATE
 # test_weight
 
 add_executable(test_weight weight.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
+  ${PROJECT_SOURCE_DIR}/Common/derived_types.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_weight.f90)
 
 target_link_libraries(test_weight contour_531 nr_util)
@@ -63,14 +63,14 @@ target_include_directories(test_weight PRIVATE ${fortrangis_INCLUDE_DIR})
 # test_read_eddy
 
 add_executable(test_read_eddy
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
+  ${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
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.f90)
+  ${PROJECT_SOURCE_DIR}/Common/shpc_open.f90
+  ${PROJECT_SOURCE_DIR}/Common/shpc_close.f90)
 
 target_link_libraries(test_read_eddy shapelib_03 contour_531 gpc_f
   ezmpi nr_util MPI::MPI_Fortran jumble)
@@ -81,16 +81,16 @@ target_include_directories(test_read_eddy PRIVATE ${fortrangis_INCLUDE_DIR})
 
 add_executable(test_send_recv
   ${CMAKE_CURRENT_LIST_DIR}/test_send_recv.f90 send_snapshot.f90
-  recv_snapshot.f90 ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.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
   ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Tests/write_extr_map.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.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 ezmpi nr_util contour_531 gpc_f NetCDF95::netcdf95
@@ -104,16 +104,16 @@ target_include_directories(test_send_recv PRIVATE
 add_executable(test_get_dispatch_snap
   ${CMAKE_CURRENT_LIST_DIR}/test_get_dispatch_snap.f90
   get_snapshot.f90 dispatch_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_field_indices.f90
+  ${PROJECT_SOURCE_DIR}/Common/read_field_indices.f90
   ${CMAKE_CURRENT_LIST_DIR}/write_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_snapshot.f90 recv_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_create.f90
-  ${CMAKE_SOURCE_DIR}/Common/write_eddy.f90
-  ${CMAKE_SOURCE_DIR}/Tests/write_extr_map.f90
-  ${CMAKE_SOURCE_DIR}/Common/read_eddy.f90 send_snapshot.f90
-  ${CMAKE_SOURCE_DIR}/Common/derived_types.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_open.f90
-  ${CMAKE_SOURCE_DIR}/Common/shpc_close.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
+  ${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)
 
 target_link_libraries(test_get_dispatch_snap shapelib_03 jumble
   contour_531 ezmpi NetCDF95::netcdf95 gpc_f nr_util
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 858f64f69d565030756da71711eeaa865352695c..5bc344b0d01c6dd12d6c72d5136ef81f90dd05a6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_executable(test_spher_polyline_area
-  ${CMAKE_SOURCE_DIR}/Common/spher_polyline_area.f90
+  ${PROJECT_SOURCE_DIR}/Common/spher_polyline_area.f90
   ${CMAKE_CURRENT_LIST_DIR}/test_spher_polyline_area.f90)
 
 target_link_libraries(test_spher_polyline_area geometry contour_531 nr_util)