Import 2017-06-07 23:51:09: master ad49b576

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-06-01 23:36:07 master a501a57a
Changeset

ENH: Add configure time check that CMake supports HTTPS

Some build targets require downloading files using the HTTPS protocol. Before
this commit, targets such as 'python-source' would fail during the build process
with errors like:

CMake Error at python-source-prefix/src/python-source-stamp/download-python-source.cmake:27 (message):
  error: downloading
  'https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz' failed

    status_code: 1
    status_string: "Unsupported protocol"
    log: Protocol "https" not supported or disabled in libcurl

This commit adds a configure-time check that CMake supports HTTPS. Now,
developers are made aware of the problem before building. If https is
supported it displays:

-- Checking if CMake supports https
-- Checking if CMake supports https - ok

If CMake doesn't support HTTPS, the configuration step now fails with a
descriptive error message and a suggested solution:

CMake Error at CMake/SlicerCheckCMakeHTTPS.cmake:21 (message):
  error: This CMake does not support the HTTPS protocol.  Ensure that CMake
  is compiled with CMAKE_USE_OPENSSL enabled.

Fixes http://www.na-mic.org/Bug/view.php?id=4098

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25147 3bd1e089-480b-0410-8dfb-8563597acbee

add - CMake/SlicerCheckCMakeHTTPS.cmake Diff File
mod - SuperBuild.cmake Diff File