172 Commits

Author SHA1 Message Date
Johnny Jazeix
2d0100fac7 replace remove and remove_directory with rm in tests 2019-11-13 18:02:18 -05:00
Kyle Edwards
dd3e476786 OpenSSL: Issue an error if OpenSSL is not found
When building with the built-in Curl, CMAKE_USE_OPENSSL is only set
to ON by default if an OpenSSL installation is detected. However, this
can cause the user to mistakenly build without OpenSSL support if
OpenSSL is not installed, because CMAKE_USE_OPENSSL is set to OFF in
that case. Always set CMAKE_USE_OPENSSL to ON by default on systems
where it could be available, skipping the initial detection, resulting
in an error when we try to use OpenSSL later on. Detect this error
and advise the user to either install OpenSSL or set CMAKE_USE_OPENSSL
to OFF.

Co-Authored-by: Brad King <brad.king@kitware.com>
2019-07-18 11:10:36 -04:00
Artalus
f4ed56ab63 Fix elseif() in place of else() 2019-07-03 11:57:53 +03:00
Brad King
90766347db curl: Update build within CMake to account for 7.65 changes 2019-05-22 14:22:22 -04:00
Brad King
a39138ef9a Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2019-05-22 (885ce314)
2019-05-22 14:15:06 -04:00
Brad King
1699f5c231 Utilities: Suppress warnings in third-party code when using XLClang 2019-02-25 08:26:17 -05:00
Brad King
214fcefa52 Remove now-unused code once used for MIPSpro on IRIX
In commit beb991110d (Remove now-unused code once used on IRIX,
2019-01-11, v3.14.0-rc1~167^2) we removed remnants of IRIX support.
Also remove remnants of MIPSpro compiler support.
2019-02-21 11:12:51 -05:00
Rechi Rechi
971d490e5b curl: do not disable IPv6 support
Allow curl's detection of IPv6 to proceed when building in CMake.
2019-01-10 13:54:25 -05:00
Brad King
b83420e45d Merge topic 'update-curl'
c1ad5118de curl: backport upstream fix to 7.62.0 regression
03bf934fbe curl: Modernize tiny test code used for build inside CMake
2b3c1bb9b0 curl: Update build within CMake to account for 7.62 changes
636bcefeab Merge branch 'upstream-curl' into update-curl
9835e90750 curl 2018-10-30 (19667715)
9c6574795c curl: Update script to get curl 7.62.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2550
2018-11-05 07:43:41 -05:00
Brad King
c1ad5118de curl: backport upstream fix to 7.62.0 regression
Backport upstream curl commit 2c5ec339ea (Curl_follow: accept
non-supported schemes for "fake" redirects, 2018-11-01) to get
a fix to curl issue 3210, a regression in 7.62.0.
2018-11-02 08:14:12 -04:00
Brad King
03bf934fbe curl: Modernize tiny test code used for build inside CMake
Drop unused code.  Report the error message on failure.
Format the source file using clang-format.
2018-11-01 08:55:50 -04:00
Brad King
2b3c1bb9b0 curl: Update build within CMake to account for 7.62 changes 2018-10-31 09:50:04 -04:00
Brad King
636bcefeab Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2018-10-30 (19667715)
2018-10-31 09:46:23 -04:00
Brad King
53e65e8e0a curl: Do not call cmake_minimum_required inside CMake itself
Re-use the requirements from the top-level.
2018-10-25 11:49:59 -04:00
Brad King
a834bcaa91 Tests: Add missing BUILD_TESTING conditions
We should not call `add_test` unless `BUILD_TESTING` is enabled.

Fixes: #18500
2018-10-24 15:51:17 -04:00
Brad King
ec13ba36b5 Merge branch 'update-curl' into release-3.13
Merge-request: !2509
2018-10-22 12:55:14 -04:00
Brad King
3dc484e531 curl: add missing type sizes for 'long long' and '__int64'
When generating `curl_config.h`, add size information for `long long`
and `__int64` types.  These are needed as candidates for defining the
`ssize_t` type because on MSVC, `long` is not the same size as `size_t`.

This problem did not affect upstream curl because it computes the
`ssize_t` type in CMake code where all sizes are available.  CMake's
port computes it in preprocessor logic because universal binaries on
macOS do not know type sizes until compile time.

Fixes: #18477
2018-10-22 12:02:38 -04:00
Brad King
0310024563 curl: Update build within CMake to account for 7.61 changes
The_CURL_STATICLIB option was replaced by BUILD_SHARED_LIBS.

Drop our own CURL_STATICLIB compile definition because it is now
provided by curl's usage requirements.
2018-10-22 08:55:40 -04:00
Brad King
b9d1107790 curl: Backport to work with CMake 3.1 again
Curl 7.61.1 requires CMake 3.4 to build from source and also exposes
a dependency on OpenSSL imported targets.  Revert that part of the
changes imported from curl upstream.
2018-10-22 08:51:01 -04:00
Brad King
e9e8dcee6b Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2018-09-04 (432eb5f5)
2018-10-22 08:48:58 -04:00
Brad King
3e913b819d Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2018-05-15 (cb013830)
2018-05-18 10:16:50 -04:00
Brad King
cd8e31a1bf Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2018-01-23 (d6c21c8e)
2018-01-24 14:18:16 -05:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Brad King
bb7591487d curl: Update build within CMake to account for 7.56 changes 2017-10-10 11:15:20 -04:00
Brad King
9e3ef40edb Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2017-10-04 (3ea76790)
2017-10-10 11:15:16 -04:00
Jérôme Duval
e7936751ee curl: Fix build on Haiku
On Haiku the network functions are in libnetwork, so use it when it
exists.
2017-06-28 08:41:49 -04:00
Brad King
a3ef36f153 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2017-06-14 (54b636f1)

Resolve a logical conflict in `Utilities/cmcurl/CMakeLists.txt`
by disabling CA bundle/path detection for build within CMake.
CMake already handles locating a CA bundle/path at runtime.
2017-06-14 11:10:22 -04:00
Brad King
95d3ebcc48 curl: Set TLS/SSL build options the way we need for CMake
Restore settings to match what we had before resolving conflicts in the
latest update.  Use native APIs on Windows and Apple.  Pass CA
bundle/path options.
2017-05-11 11:27:41 -04:00
Brad King
11ba72c6d6 curl: Skip building docs within CMake 2017-05-11 11:27:37 -04:00
Brad King
299975908a Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2017-04-19 (d957e218)

Resolve conflicts in `CMakeLists.txt` in favor of the upstream version.
We will re-apply our logic as needed in following commits.
2017-05-11 11:27:21 -04:00
Brad King
73ae67006c curl: Fix passing _WINSOCKAPI_ macro to compiler
Define `_WINSOCKAPI_` blank rather than to 1 in order to match the
value used by Microsoft's winsock header files.

Backported from upstream curl commit 192466e0 (cmake: Fix passing
_WINSOCKAPI_ macro to compiler, 2017-01-09).

Fixes: #16545
2017-02-07 11:39:49 -05:00
Brad King
1df9d5f919 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2016-12-22 (44b9b4d4)
2017-02-07 11:38:00 -05:00
Brad King
df7fa47c1b curl: Disable symbol hiding logic in build for CMake
We already disable the code using `HIDES_CURL_PRIVATE_SYMBOLS`, so skip
the code to set it too, thus avoiding unnecessary `message()` calls.
2016-12-06 08:18:33 -05:00
Brad King
f8a1ba202f Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2016-11-02 (3c561c65)
2016-12-05 11:50:43 -05:00
Brad King
4b53a693bd curl: Backport certificate reuse fix from 7.50.2
Backport curl upstream commit curl-7_50_2~32 (nss: refuse previously
loaded certificate from file, 2016-08-22).
2016-09-07 08:46:42 -04:00
Brad King
f59ab43370 curl: Remove CMake-specific README
We will now manage the curl source tree updates using
the `Utilities/Scripts/update-curl.bash` script.  Drop
the README that covered the old method.
2016-08-03 14:31:05 -04:00
Brad King
f53f4a8a2d Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2016-08-03 (f2cb3a01)
2016-08-03 14:26:53 -04:00
Felix Geyer
49e82c15d5 Fix spelling typos in comments and documentation (#16037)
The Debian package checker tool (lintian) detected several typos in
CMake.
2016-03-29 14:31:02 -04:00
Gregor Jasny
01b6ecdb41 curl: Do not use libnetwork on Apple platforms
Starting with OS X 10.11 there is a library called libnetwork
which will be picked up during curl configuration.
This breaks backward compatibility of the resulting binaries
because libnetwork is not available on older OS X versions.
2015-09-10 11:25:42 -04:00
Brad King
4071a74707 curl: Update README-CMake.txt for new snapshot 2015-08-17 10:17:51 -04:00
Brad King
7727d485d3 curl: Update configuration of build within CMake
Update our curl build option settings as needed for CMake to account for
differences in curl options from 7.38 to 7.44.
2015-08-17 10:17:51 -04:00
Brad King
3f2f1a949c curl: Fix check for gethostbyname_r with 5 arguments
Fix the check code to pass 5 arguments instead of 6.  This typo was
introduced in curl 7.39 but was not noticed because the result of
this check is used only if ENABLE_IPV6 is OFF.
2015-08-17 10:17:50 -04:00
Brad King
91e8d35ab8 Merge branch 'curl-upstream' into update-curl
Resolve conflicts by taking upstream side when possible and otherwise
integrating the changes from both sides.  Be carful in CMakeLists.txt
where the OPENSSL code block that we modified previously has moved, and
preserve our previous modifications in the new location.
2015-08-12 15:43:52 -04:00
Brad King
4a2ff2b7f2 curl: Never consider using Windows APIs on Cygwin
Our Windows API header checks are conditioned on if(NOT UNIX) but
libarchive checks HAVE_WINDOWS_H anyway so the result leaks into
the cache and influenes the curl build.  Set the check results to
false explicitly for curl when not on Windows to tolerate this.

Reported-by: Vyacheslav Karpukhin <Vyacheslav.Karpukhin@jetbrains.com>
2015-03-26 14:04:39 -04:00
Brad King
1337576b24 Merge topic 'curl-default-cainfo'
0abd3e53 cmake: Use a default CA path when not using system curl
6ce346c5 curl: Add CURL_CA_PATH option to CMake build process
2015-01-26 09:51:50 -05:00
Brad King
29ef8fb5be Merge topic 'update-curl'
53df9bce curl: Add README-CMake.txt
2015-01-23 10:50:24 -05:00
Brad King
6ce346c53c curl: Add CURL_CA_PATH option to CMake build process
Move CMAKE_USE_OPENSSL and CURL_CA_BUNDLE up to the top of CMake so that
CMake's own sources can know their values.  Add the CURL_CA_PATH option
at the top and honor it as part of the curl build.
2015-01-23 08:23:52 -05:00
Brad King
53df9bce19 curl: Add README-CMake.txt
Describe how to update curl from upstream.
2015-01-22 10:00:04 -05:00
Brad King
e4563257ba curl: Use OS X SSL/TLS native implementation
On OS X, when CMAKE_USE_OPENSSL is OFF, use the OS implementation.
This will allow the OS-configured CA list to be trusted automatically.

This is supported on OS X 10.6 and above using AppleClang, Clang, and
GNU compilers.
2014-12-18 09:44:19 -05:00
Brad King
ba8c663219 curl: Use Windows SSL/TLS native implementation
On Windows, when CMAKE_USE_OPENSSL is OFF, use the OS implementation.
This will allow the OS-configured CA list to be trusted automatically.
2014-12-12 13:52:46 -05:00