diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 93553b8f..2585001d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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) @@ -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}") @@ -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) @@ -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}")