Replace ENABLE_LOGGING with NETCDF_ENABLE_LOGGING

This commit is contained in:
Kyle Shores 2024-03-18 15:37:21 -05:00
parent 9584b4fa3b
commit dcdff98109
7 changed files with 12 additions and 12 deletions

View File

@ -487,17 +487,17 @@ else()
endif()
# Option Logging, only valid for netcdf4.
option(ENABLE_LOGGING "Enable Logging." OFF)
option(NETCDF_ENABLE_LOGGING "Enable Logging." OFF)
if(NOT ENABLE_NETCDF_4)
set(ENABLE_LOGGING OFF)
set(NETCDF_ENABLE_LOGGING OFF)
endif()
if(ENABLE_LOGGING)
if(NETCDF_ENABLE_LOGGING)
target_compile_definitions(netcdf PRIVATE LOGGING ENABLE_SET_LOG_LEVEL)
set(LOGGING ON)
set(ENABLE_SET_LOG_LEVEL ON)
endif()
option(ENABLE_SET_LOG_LEVEL_FUNC "Enable definition of nc_set_log_level()." ON)
if(ENABLE_NETCDF_4 AND NOT ENABLE_LOGGING AND ENABLE_SET_LOG_LEVEL_FUNC)
if(ENABLE_NETCDF_4 AND NOT NETCDF_ENABLE_LOGGING AND ENABLE_SET_LOG_LEVEL_FUNC)
target_compile_definitions(netcdf PRIVATE -DENABLE_SET_LOG_LEVEL)
set(ENABLE_SET_LOG_LEVEL ON)
endif()
@ -1647,7 +1647,7 @@ is_enabled(ENABLE_NCZARR HAS_NCZARR)
is_enabled(ENABLE_NCZARR_ZIP HAS_NCZARR_ZIP)
is_enabled(ENABLE_NCZARR_ZIP DO_NCZARR_ZIP_TESTS)
is_enabled(ENABLE_QUANTIZE HAS_QUANTIZE)
is_enabled(ENABLE_LOGGING HAS_LOGGING)
is_enabled(NETCDF_ENABLE_LOGGING HAS_LOGGING)
is_enabled(NETCDF_ENABLE_FILTER_TESTING DO_FILTER_TESTS)
is_enabled(HAVE_SZ HAS_SZIP)
is_enabled(HAVE_SZ HAS_SZLIB_WRITE)

View File

@ -34,7 +34,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=FALSE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=FALSE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DNETCDF_ENABLE_DAP_REMOTE_TESTS=TRUE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DNETCDF_ENABLE_DAP_REMOTE_TESTS=TRUE")
set(CTEST_DROP_METHOD https)

View File

@ -45,9 +45,9 @@ To build netcdf-c with logging using autotools, add the
## Building netcdf-c with Logging using the CMake Build
To build netcdf-c with logging using CMake, set the ENABLE_LOGGING option to ON:
To build netcdf-c with logging using CMake, set the NETCDF_ENABLE_LOGGING option to ON:
`cmake -DENABLE_LOGGING=ON -DCMAKE_PREFIX_PATH=/usr/local/hdf5-1.14.0 ..`
`cmake -DNETCDF_ENABLE_LOGGING=ON -DCMAKE_PREFIX_PATH=/usr/local/hdf5-1.14.0 ..`
## Checking that Logging was Enabled

View File

@ -46,7 +46,7 @@ else
has_nc4="yes"
fi
has_logging="@ENABLE_LOGGING@"
has_logging="@NETCDF_ENABLE_LOGGING@"
if [ -z "$has_logging" -o "$has_logging" = "OFF" ]; then
has_logging="no"
else