mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Correct an issue using internal S3 API/SDK, reworked options so that instead of specifying S3_AWS support AND AWS-SDK or INTERNAL-SDK, you just specify which SDK you want to use and the inference is that you want to use S3 support.
This commit is contained in:
parent
76ad6dede9
commit
7bf9078f67
@ -735,13 +735,18 @@ if(NOT WIN32)
|
||||
endif()
|
||||
|
||||
# Options for S3 Support
|
||||
option(NETCDF_ENABLE_S3 "Enable S3 support." OFF)
|
||||
#option(NETCDF_ENABLE_S3 "Enable S3 support." OFF)
|
||||
option(NETCDF_ENABLE_S3_AWS "Enable S3 support via AWS-CPP-SDK" OFF)
|
||||
option(NETCDF_ENABLE_S3_INTERNAL "Enable S3 Internal support." OFF)
|
||||
option(NETCDF_ENABLE_NCZARR_S3 "Enable NCZarr S3 support; Deprecated in favor of NETCDF_ENABLE_S3" OFF)
|
||||
|
||||
cmake_dependent_option(NETCDF_ENABLE_S3 "Enable S3 Support" ON "NETCDF_ENABLE_S3_AWS OR NETCDF_ENABLE_S3_INTERNAL" OFF)
|
||||
|
||||
option(NETCDF_ENABLE_NCZARR_S3 "Enable NCZarr S3 support; Deprecated in favor of NETCDF_ENABLE_S3" ${NETCDF_ENABLE_S3})
|
||||
|
||||
if(NOT NETCDF_ENABLE_REMOTE_FUNCTIONALITY)
|
||||
set(NETCDF_ENABLE_S3 OFF CACHE BOOL "" FORCE)
|
||||
set(NETCDF_ENABLE_S3_INTERNAL OFF CACHE BOOL "" FORCE)
|
||||
set(NETCDF_ENABLE_S3_AWSS OFF CACHE BOOL "" FORCE)
|
||||
set(NETCDF_ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
@ -429,7 +429,7 @@ endif ()
|
||||
# because for some reason this screws up if we unconditionally test for sdk
|
||||
# and it is not available. Fix someday
|
||||
if(NETCDF_ENABLE_S3)
|
||||
if(NOT NETCDF_ENABLE_S3_INTERNAL)
|
||||
if(NETCDF_ENABLE_S3_AWS)
|
||||
# See if aws-s3-sdk is available
|
||||
find_package(AWSSDK REQUIRED COMPONENTS s3;transfer)
|
||||
if(AWSSDK_FOUND)
|
||||
@ -441,7 +441,7 @@ if(NETCDF_ENABLE_S3)
|
||||
else(AWSSDK_FOUND)
|
||||
set(NETCDF_ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
|
||||
endif(AWSSDK_FOUND)
|
||||
else(NOT NETCDF_ENABLE_S3_INTERNAL)
|
||||
else(NETCDF_ENABLE_S3_INTERNAL)
|
||||
# Find crypto libraries required with testing with the internal s3 api.
|
||||
#find_library(SSL_LIB NAMES ssl openssl)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
@ -454,7 +454,7 @@ if(NETCDF_ENABLE_S3)
|
||||
# message(FATAL_ERROR "Can't find a crypto library, required by S3_INTERNAL")
|
||||
#endif(NOT CRYPTO_LIB)
|
||||
|
||||
endif(NOT NETCDF_ENABLE_S3_INTERNAL)
|
||||
endif(NETCDF_ENABLE_S3_AWS)
|
||||
else()
|
||||
set(NETCDF_ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
|
||||
endif()
|
||||
|
@ -122,7 +122,7 @@ NC_s3sdkinitialize(void)
|
||||
}
|
||||
|
||||
/* Get environment information */
|
||||
NC_s3sdkenvironment(void);
|
||||
NC_s3sdkenvironment();
|
||||
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user