Skip to content

Commit

Permalink
tests/CMakeLists.txt: Fix interp/input mod deps and clean up target defs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Aug 9, 2024
1 parent b4ad94a commit f70a1fa
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ foreach(kind ${kinds})
add_test(test_earth_radius_${kind} test_earth_radius_${kind})

# grib-2 tests
add_library(test_input_library_grib2_${kind} input_data_mod_grib2_${kind}.F90)
target_link_libraries(test_input_library_grib2_${kind} PUBLIC ip::ip_${kind})
target_compile_definitions(test_input_library_grib2_${kind} PUBLIC "LSIZE=${kind_definition}")
set_target_properties(test_input_library_grib2_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")
add_library(test_library_grib2_${kind} input_data_mod_grib2_${kind}.F90 interp_mod_grib2_${kind}.F90)
target_link_libraries(test_library_grib2_${kind} PUBLIC ip::ip_${kind})
target_compile_definitions(test_library_grib2_${kind} PRIVATE "LSIZE=${kind_definition}")
target_link_libraries(test_library_grib2_${kind} PUBLIC test_input_library_grib2_${kind})
set_target_properties(test_library_grib2_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")

add_executable(tst_gdswzd_grib2_${kind} tst_gdswzd_grib2.c)
Expand All @@ -67,8 +70,6 @@ foreach(kind ${kinds})
add_executable(test_vector_grib2_${kind} test_vector_grib2.F90)
target_link_libraries(test_scalar_grib2_${kind} PRIVATE test_library_grib2_${kind})
target_link_libraries(test_vector_grib2_${kind} PRIVATE test_library_grib2_${kind})
target_compile_definitions(test_scalar_grib2_${kind} PRIVATE "LSIZE=${kind_definition}")
target_compile_definitions(test_vector_grib2_${kind} PRIVATE "LSIZE=${kind_definition}")
set_target_properties(test_scalar_grib2_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")
set_target_properties(test_vector_grib2_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")

Expand Down Expand Up @@ -112,9 +113,12 @@ foreach(kind ${kinds})
add_test(test_station_points_neighbor_budget_vector_grib2_${kind} test_vector_grib2_${kind} -1 6)

# grib-1 tests
add_library(test_library_grib1_${kind} input_data_mod_grib1_${kind}.F90 interp_mod_grib1_${kind}.F90)
target_link_libraries(test_library_grib1_${kind} PUBLIC ip::ip_${kind})
target_compile_definitions(test_library_grib1_${kind} PRIVATE "LSIZE=${kind_definition}")
add_library(test_input_library_grib1_${kind} input_data_mod_grib1_${kind}.F90)
target_link_libraries(test_input_library_grib1_${kind} PUBLIC ip::ip_${kind})
target_compile_definitions(test_input_library_grib1_${kind} PUBLIC "LSIZE=${kind_definition}")
set_target_properties(test_input_library_grib1_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")
add_library(test_library_grib1_${kind} interp_mod_grib1_${kind}.F90)
target_link_libraries(test_library_grib1_${kind} PUBLIC test_input_library_grib1_${kind})
set_target_properties(test_library_grib1_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")

add_executable(tst_gdswzd_grib1_${kind} tst_gdswzd_grib1.c)
Expand All @@ -126,8 +130,6 @@ foreach(kind ${kinds})
add_executable(test_vector_grib1_${kind} test_vector_grib1.F90)
target_link_libraries(test_scalar_grib1_${kind} PRIVATE test_library_grib1_${kind})
target_link_libraries(test_vector_grib1_${kind} PRIVATE test_library_grib1_${kind})
target_compile_definitions(test_scalar_grib1_${kind} PRIVATE "LSIZE=${kind_definition}")
target_compile_definitions(test_vector_grib1_${kind} PRIVATE "LSIZE=${kind_definition}")
set_target_properties(test_scalar_grib1_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")
set_target_properties(test_vector_grib1_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")

Expand Down

0 comments on commit f70a1fa

Please sign in to comment.