mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Fix some warning in cmake
re: Issue https://github.com/Unidata/netcdf-c/issues/2939 The problem managing inter-dependent options. I was looking for certain cases of the form, where x and y are options. ```` if( not x and y) message(warning "not x => not y) endif ```` However in a couple of cases (including the referenced Issue), I was only testing this: ```` if( not x) message(warning "not x => not y) endif ```` Fix is to correct the tests.
This commit is contained in:
parent
be009ed741
commit
7d966b4bfe
@ -513,7 +513,7 @@ endif()
|
||||
|
||||
# enable|disable all forms of network access
|
||||
option(NETCDF_ENABLE_REMOTE_FUNCTIONALITY "Enable|disable all forms remote data access (DAP, S3, etc)" ON)
|
||||
if(NOT NETCDF_ENABLE_REMOTE_FUNCTIONALITY)
|
||||
if(NOT NETCDF_ENABLE_REMOTE_FUNCTIONALITY AND NETCDF_ENABLE_DAP)
|
||||
message(WARNING "NETCDF_ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_DAP[4]=NO")
|
||||
set(NETCDF_ENABLE_DAP OFF CACHE BOOL "NETCDF_ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_DAP=NO" FORCE)
|
||||
set(NETCDF_ENABLE_DAP2 OFF CACHE BOOL "NETCDF_ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_DAP2=NO" FORCE)
|
||||
@ -587,7 +587,7 @@ endif()
|
||||
|
||||
# Option to support byte-range reading of remote datasets
|
||||
option(NETCDF_ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." ${NETCDF_ENABLE_DAP})
|
||||
if(NOT NETCDF_ENABLE_REMOTE_FUNCTIONALITY)
|
||||
if(NOT NETCDF_ENABLE_REMOTE_FUNCTIONALITY AND NETCDF_ENABLE_BYTERANGE)
|
||||
message(WARNING "NETCDF_ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_BYTERANGE=NO")
|
||||
set(NETCDF_ENABLE_BYTERANGE OFF CACHE BOOL "NETCDF_ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_BYTERANGE=NO" FORCE)
|
||||
endif()
|
||||
@ -604,7 +604,7 @@ set(NETCDF_ENABLE_DAP_LONG_TESTS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# Provide a global control for remotetest.
|
||||
if ("$ENV{REMOTETESTDOWN}" STREQUAL "yes")
|
||||
if ("$ENV{REMOTETESTDOWN}" STREQUAL "yes" AND NETCDF_ENABLE_DAP_REMOTE_TESTS)
|
||||
message(WARNING "ENV(REMOTETESTDOWN) => NETCDF_ENABLE_DAP_REMOTE_TESTS == OFF")
|
||||
set(NETCDF_ENABLE_DAP_REMOTE_TESTS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
@ -1035,8 +1035,8 @@ if (NOT NETCDF_ENABLE_PLUGINS AND NETCDF_ENABLE_NCZARR_FILTERS)
|
||||
set(NETCDF_ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Enable NCZarr Filters." FORCE)
|
||||
endif()
|
||||
|
||||
IF (NOT NETCDF_ENABLE_NCZARR)
|
||||
message(WARNING "NETCDF_ENABLE_NCZARR==NO => NETCDF_ENABLE_NCZARR_FILTERS==NO")
|
||||
IF (NOT NETCDF_ENABLE_NCZARR AND NETCDF_ENABLE_NCZARR_FILTERS)
|
||||
message(WARNING "NETCDF_ENABLE_NCZARR==NO => NETCDF_ENABLE_NCZARR_FILTERS==NO")
|
||||
set(NETCDF_ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Disable NCZARR_FILTERS" FORCE)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user