You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
976 B
36 lines
976 B
function(download case)
|
|
# URL with semantics like https://expired.badssl.com is provided by caller
|
|
file(DOWNLOAD ${url} ${ARGN} STATUS status LOG log)
|
|
message(STATUS "${case}: ${status}")
|
|
if(case MATCHES "1$" AND NOT status MATCHES "^(35|60);")
|
|
message("${log}")
|
|
endif()
|
|
endfunction()
|
|
|
|
# The default is OFF.
|
|
unset(ENV{CMAKE_TLS_VERIFY})
|
|
unset(CMAKE_TLS_VERIFY)
|
|
download(def-0)
|
|
|
|
# The environment variable overrides the default.
|
|
set(ENV{CMAKE_TLS_VERIFY} 0)
|
|
download(env-0)
|
|
set(ENV{CMAKE_TLS_VERIFY} 1)
|
|
download(env-1)
|
|
|
|
# The cmake variable overrides the environment variable.
|
|
set(ENV{CMAKE_TLS_VERIFY} 1)
|
|
set(CMAKE_TLS_VERIFY 0)
|
|
download(var-0)
|
|
set(ENV{CMAKE_TLS_VERIFY} 0)
|
|
set(CMAKE_TLS_VERIFY 1)
|
|
download(var-1)
|
|
|
|
# The explicit argument overrides the cmake variable and the environment variable.
|
|
set(ENV{CMAKE_TLS_VERIFY} 1)
|
|
set(CMAKE_TLS_VERIFY 1)
|
|
download(opt-0 TLS_VERIFY 0)
|
|
set(ENV{CMAKE_TLS_VERIFY} 0)
|
|
set(CMAKE_TLS_VERIFY 0)
|
|
download(opt-1 TLS_VERIFY 1)
|