From dae1956d39b414f2b7ae189bc3eea32c859bcc94 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:25:36 -0600 Subject: [PATCH] Updated CMakeLists.txt for FTP fetch --- CMakeLists.txt | 8 +++++++- tests/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 831c9c31..121feb66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ option(USE_PNG "Use PNG?" off) option(USE_JASPER "Use Jasper?" off) option(USE_OPENJPEG "Use OpenJPEG?" off) option(USE_AEC "Use AEC?" off) -option(FTP_TEST_FILES "Fetch and test with files on FTP site." ON) +option(FTP_TEST_FILES "Fetch and test with files on FTP site." OFF) option(FTP_LARGE_TEST_FILES "Fetch and test with very large files on FTP site." OFF) option(FTP_EXTRA_TEST_FILES "Fetch even more large files from FTP and test them." OFF) # MAKE_FTN_API should only be on when building library @@ -40,6 +40,12 @@ set(BUILD_COMMENTS "stock build") option(BUILD_LIB "Build wgrib2 library?" on) option(BUILD_SHARED_LIB "Build shared library?" off) +# Developers can use this option to specify a local directory which +# holds the test files. They will be copied instead of fetching the +# files via FTP. +SET(TEST_FILE_DIR "." CACHE STRING "Check this directory for test files before using FTP.") +message(STATUS "Finding test data files in directory ${TEST_FILE_DIR}.") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # Set default install path if not provided. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b832bfb4..f01d98fe 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,7 @@ # project. # # Ed Hartnett 3/27/24 +# Alyson Stahl 4/17/24 # Run each shell test. function(shell_test name)