From 554eb74ab60d50904ca874c84c3f5cb319716ac0 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Thu, 6 Jun 2024 09:34:30 -0700 Subject: [PATCH] Make various utils tests conditional on BUILD_{4,D} --- test_utils/CMakeLists.txt | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/test_utils/CMakeLists.txt b/test_utils/CMakeLists.txt index cc8f9d33..168e5fa8 100644 --- a/test_utils/CMakeLists.txt +++ b/test_utils/CMakeLists.txt @@ -3,11 +3,13 @@ # # Ed Hartnett -# This fortran test is for the internals of degrib2. -add_executable(test_degrib2_int test_degrib2_int.F90 ${CMAKE_SOURCE_DIR}/utils/prlevel.F90 - ${CMAKE_SOURCE_DIR}/utils/prvtime.F90) -target_link_libraries(test_degrib2_int PUBLIC ${PROJECT_NAME}_4) -add_test(NAME test_degrib2_int COMMAND test_degrib2_int) +if(BUILD_4) + # This fortran test is for the internals of degrib2. + add_executable(test_degrib2_int test_degrib2_int.F90 ${CMAKE_SOURCE_DIR}/utils/prlevel.F90 + ${CMAKE_SOURCE_DIR}/utils/prvtime.F90) + target_link_libraries(test_degrib2_int PUBLIC ${PROJECT_NAME}_4) + add_test(NAME test_degrib2_int COMMAND test_degrib2_int) +endif() # Run each shell test. function(gu_test name) @@ -77,12 +79,16 @@ if(FTP_TEST_FILES) endif() # Run these shell tests. -gu_test(run_cnvgrib_tests) -gu_test(run_copygb2_tests2) -gu_test(run_degrib2_tests) -gu_test(run_grb2index_tests) -gu_test(run_tocgrib2_tests) -gu_test(run_tocgrib2super_tests) +if(BUILD_4) + if(BUILD_D) + gu_test(run_copygb2_tests2) + endif() + gu_test(run_cnvgrib_tests) + gu_test(run_degrib2_tests) + gu_test(run_grb2index_tests) + gu_test(run_tocgrib2_tests) + gu_test(run_tocgrib2super_tests) +endif() gu_test(run_copygb_tests) gu_test(run_grbindex_tests)