Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/CMakeLists.txt: Fix interp/input mod deps and clean up target defs #253

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 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_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}")
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} interp_mod_grib2_${kind}.F90)
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