moving functions and macros to new file, lowercase things

This commit is contained in:
Kyle Shores 2024-01-18 09:15:20 -06:00
parent 3a73058e4e
commit 9fb46ce480
3 changed files with 12 additions and 6 deletions

View File

@ -70,12 +70,8 @@ endif()
###
# This should be set using the output of dpkg --print-architecture.
FIND_PROGRAM(NC_DPKG NAMES dpkg)
if(NC_DPKG)
# Define a macro for getting the dpkg architecture.
macro(getdpkg_arch arch)
execute_process(COMMAND "${NC_DPKG}" "--print-architecture" OUTPUT_VARIABLE "${arch}" OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro(getdpkg_arch)
getdpkg_arch(dpkg_arch)
set(CPACK_DEBIAN_PACKAGE_NAME "netcdf4-dev")

View File

@ -61,9 +61,9 @@ if(ENABLE_HDF4)
message(STATUS "Found JPEG libraries: ${JPEG_LIB}")
# Option to enable HDF4 file tests.
OPTION(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON)
option(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON)
if(ENABLE_HDF4_FILE_TESTS)
FIND_PROGRAM(PROG_CURL NAMES curl)
find_program(PROG_CURL NAMES curl)
if(PROG_CURL)
set(USE_HDF4_FILE_TESTS ON )
else()
@ -649,4 +649,11 @@ endif()
################################
if(ENABLE_DOXYGEN)
find_package(Doxygen REQUIRED)
endif()
################################
# NC_DPKG
################################
if (NETCDF_PACKAGE)
find_program(NC_DPKG NAMES dpkg)
endif()

View File

@ -275,6 +275,9 @@ macro(add_sh_test prefix F)
endif()
endmacro()
macro(getdpkg_arch arch)
execute_process(COMMAND "${NC_DPKG}" "--print-architecture" OUTPUT_VARIABLE "${arch}" OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro(getdpkg_arch)
################################
# Functions