Skip to content
Snippets Groups Projects
Commit 02526573 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Move add_executable lines for test programs from main CMakeLists.txt to

Tests/CMakeLists.txt. This is more concise since we can merge them
with target_sources.

Bug fix: missing source file successive_overlap.f90 for target
test_read_snapshot.
parent 7b445571
No related branches found
No related tags found
No related merge requests found
......@@ -54,45 +54,5 @@ target_link_libraries(extraction_eddies ${contour_531_LIBRARY}
${shapelib_03_LIBRARY} ${fortrangis_LIBRARY} ${fortranc_LIBRARY}
${shapelib_LIBRARY} ${geometry_LIBRARY})
# Tests
add_executable(test_local_extrema local_extrema.f90)
add_executable(test_get_1_outerm good_contour.f90 derived_types.f90
get_1_outerm.f90 spher_polyline_area.f90)
add_executable(test_set_max_speed derived_types.f90 set_max_speed.f90
good_contour.f90 max_speed_contour_ssh.f90 mean_speed.f90
spher_polyline_area.f90 inside_4.f90)
add_executable(test_set_all_outerm derived_types.f90 set_all_outerm.f90
local_extrema.f90 get_1_outerm.f90 good_contour.f90 spher_polyline_area.f90
nearby_extr.f90 get_var.f90)
add_executable(test_weight weight.f90 derived_types.f90)
add_executable(test_spher_polygon_area spher_polygon_area.f90
spher_polyline_area.f90)
add_executable(test_read_eddy derived_types.f90 init_shapefiles.f90
read_eddy.f90 write_eddy.f90 read_field_indices.f90)
add_executable(test_read_snapshot derived_types.f90 init_shapefiles.f90
read_snapshot.f90 write_eddy.f90 read_eddy.f90 read_field_indices.f90)
add_executable(test_successive_overlap derived_types.f90
successive_overlap.f90 read_snapshot.f90 spher_polygon_area.f90
spher_polyline_area.f90 weight.f90 read_eddy.f90 read_field_indices.f90)
add_executable(test_nearby_extr nearby_extr.f90 derived_types.f90)
add_executable(test_max_speed_contour_ssh derived_types.f90
max_speed_contour_ssh.f90 get_var.f90)
add_executable(test_good_contour good_contour.f90)
add_executable(test_inside_4 inside_4.f90)
add_executable(test_mean_speed mean_speed.f90)
add_executable(test_spher_polyline_area spher_polyline_area.f90)
include(Tests/CMakeLists.txt)
include(ConfigureCompilerFlags)
# test_max_speed_contour
# test_max_speed_contour_ssh
target_sources(test_max_speed_contour_ssh PRIVATE
add_executable(test_max_speed_contour_ssh derived_types.f90
max_speed_contour_ssh.f90 get_var.f90
${CMAKE_CURRENT_LIST_DIR}/test_max_speed_contour_ssh.f90)
target_include_directories(test_max_speed_contour_ssh PRIVATE
......@@ -13,7 +14,7 @@ target_link_libraries(test_max_speed_contour_ssh ${netcdf95_LIBRARY}
# test_nearby_extr
target_sources(test_nearby_extr PRIVATE
add_executable(test_nearby_extr nearby_extr.f90 derived_types.f90
${CMAKE_CURRENT_LIST_DIR}/test_nearby_extr.f90)
target_include_directories(test_nearby_extr PRIVATE
......@@ -28,7 +29,9 @@ target_link_libraries(test_nearby_extr ${contour_531_LIBRARY}
# test_successive_overlap
target_sources(test_successive_overlap PRIVATE
add_executable(test_successive_overlap derived_types.f90
successive_overlap.f90 read_snapshot.f90 spher_polygon_area.f90
spher_polyline_area.f90 weight.f90 read_eddy.f90 read_field_indices.f90
${CMAKE_CURRENT_LIST_DIR}/test_successive_overlap.f90)
target_include_directories(test_successive_overlap PRIVATE
......@@ -43,7 +46,10 @@ target_link_libraries(test_successive_overlap ${contour_531_LIBRARY}
# test_read_snapshot
target_sources(test_read_snapshot PRIVATE
add_executable(test_read_snapshot derived_types.f90
init_shapefiles.f90 read_snapshot.f90 write_eddy.f90 read_eddy.f90
read_field_indices.f90 successive_overlap.f90 spher_polygon_area.f90
spher_polyline_area.f90 weight.f90
${CMAKE_CURRENT_LIST_DIR}/test_read_snapshot.f90
${CMAKE_CURRENT_LIST_DIR}/write_extr_map.f90)
......@@ -53,12 +59,13 @@ target_include_directories(test_read_snapshot PRIVATE
target_link_libraries(test_read_snapshot ${contour_531_LIBRARY}
${shapelib_03_LIBRARY} ${nr_util_LIBRARY} ${fortrangis_LIBRARY}
${fortranc_LIBRARY} ${shapelib_LIBRARY} ${GPC_F_LIBRARY}
${netcdf95_LIBRARY} ${netcdff_LIBRARY} ${NetCDF_LIBRARY})
${fortranc_LIBRARY} ${shapelib_LIBRARY} ${GPC_F_LIBRARY} ${GPC_LIBRARY}
${netcdf95_LIBRARY} ${netcdff_LIBRARY} ${NetCDF_LIBRARY} ${geometry_LIBRARY})
# test_spher_polygon_area
target_sources(test_spher_polygon_area PRIVATE
add_executable(test_spher_polygon_area spher_polygon_area.f90
spher_polyline_area.f90
${CMAKE_CURRENT_LIST_DIR}/test_spher_polygon_area.f90)
target_include_directories(test_spher_polygon_area PRIVATE
......@@ -71,7 +78,7 @@ target_link_libraries(test_spher_polygon_area ${contour_531_LIBRARY}
# test_local_extrema
target_sources(test_local_extrema PRIVATE
add_executable(test_local_extrema local_extrema.f90
${CMAKE_CURRENT_LIST_DIR}/test_local_extrema.f90
${CMAKE_CURRENT_LIST_DIR}/write_extr_map.f90)
......@@ -84,8 +91,10 @@ target_link_libraries(test_local_extrema ${jumble_LIBRARY}
# test_set_max_speed
target_sources(test_set_max_speed PRIVATE
${CMAKE_CURRENT_LIST_DIR}/test_set_max_speed.f90)
add_executable(test_set_max_speed derived_types.f90 set_max_speed.f90
good_contour.f90 max_speed_contour_ssh.f90 mean_speed.f90
spher_polyline_area.f90 inside_4.f90
${CMAKE_CURRENT_LIST_DIR}/test_set_max_speed.f90)
target_include_directories(test_set_max_speed PRIVATE
${contour_531_INCLUDE_DIR} ${netcdff_INCLUDE_DIR} ${fortrangis_INCLUDE_DIR})
......@@ -98,7 +107,8 @@ target_link_libraries(test_set_max_speed ${contour_531_LIBRARY}
# test_weight
target_sources(test_weight PRIVATE ${CMAKE_CURRENT_LIST_DIR}/test_weight.f90)
add_executable(test_weight weight.f90 derived_types.f90
${CMAKE_CURRENT_LIST_DIR}/test_weight.f90)
target_include_directories(test_weight PRIVATE ${contour_531_INCLUDE_DIR})
......@@ -106,7 +116,8 @@ target_link_libraries(test_weight ${contour_531_LIBRARY})
# test_read_eddy
target_sources(test_read_eddy PRIVATE
add_executable(test_read_eddy derived_types.f90 init_shapefiles.f90
read_eddy.f90 write_eddy.f90 read_field_indices.f90
${CMAKE_CURRENT_LIST_DIR}/test_read_eddy.f90)
target_include_directories(test_read_eddy PRIVATE
......@@ -118,7 +129,8 @@ target_link_libraries(test_read_eddy ${contour_531_LIBRARY}
# test_get_1_outerm
target_sources(test_get_1_outerm PRIVATE
add_executable(test_get_1_outerm good_contour.f90 derived_types.f90
get_1_outerm.f90 spher_polyline_area.f90
${CMAKE_CURRENT_LIST_DIR}/test_get_1_outerm.f90)
target_include_directories(test_get_1_outerm PRIVATE
......@@ -132,7 +144,9 @@ target_link_libraries(test_get_1_outerm ${contour_531_LIBRARY}
# test_set_all_outerm
target_sources(test_set_all_outerm PRIVATE
add_executable(test_set_all_outerm derived_types.f90 set_all_outerm.f90
local_extrema.f90 get_1_outerm.f90 good_contour.f90 spher_polyline_area.f90
nearby_extr.f90 get_var.f90
${CMAKE_CURRENT_LIST_DIR}/test_set_all_outerm.f90)
target_include_directories(test_set_all_outerm PRIVATE
......@@ -146,7 +160,7 @@ target_link_libraries(test_set_all_outerm ${contour_531_LIBRARY}
# test_good_contour
target_sources(test_good_contour PRIVATE
add_executable(test_good_contour good_contour.f90
${CMAKE_CURRENT_LIST_DIR}/test_good_contour.f90)
target_include_directories(test_good_contour PRIVATE
......@@ -160,7 +174,7 @@ target_link_libraries(test_good_contour ${contour_531_LIBRARY}
# test_inside_4
target_sources(test_inside_4 PRIVATE
add_executable(test_inside_4 inside_4.f90
${CMAKE_CURRENT_LIST_DIR}/test_inside_4.f90)
target_include_directories(test_inside_4 PRIVATE
......@@ -172,7 +186,7 @@ target_link_libraries(test_inside_4 ${geometry_LIBRARY}
# test_mean_speed
target_sources(test_mean_speed PRIVATE
add_executable(test_mean_speed mean_speed.f90
${CMAKE_CURRENT_LIST_DIR}/test_mean_speed.f90)
target_include_directories(test_mean_speed PRIVATE
......@@ -185,7 +199,7 @@ target_link_libraries(test_mean_speed ${numer_rec_95_LIBRARY} ${nr_util_LIBRARY}
# test_spher_polyline_area
target_sources(test_spher_polyline_area PRIVATE
add_executable(test_spher_polyline_area spher_polyline_area.f90
${CMAKE_CURRENT_LIST_DIR}/test_spher_polyline_area.f90)
target_include_directories(test_spher_polyline_area PRIVATE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment