1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 14:05:03 -05:00
Commit Graph

229 Commits

Author SHA1 Message Date
Rolf Eike Beer
fc9312f717 CMake: clean up and improve build procedures
- remove check for unsupported old CMake versions

- do not link to c-ares library twice

- modernize custom Find modules

    - FindLibSSH2:
        - pass version to FPHSA to show it in the output
        - use LIBSSH2_VERSION define to extract the version number in
          one shot. This variable exists in the header for 10 years.
        - remove unneeded code

    - FindNGHTTP2.cmake:
        - drop needless FPHSA argument
        - mark found variables as advanced

    - FindNSS.cmake:
        - show version number

    - FindCARES.cmake:
        - drop default paths
        - use FPHSA instead of checking things by hand

- remove needless explict variable dereference

- simplify count_true()

- allow all policies up to version 3.16 to be set to NEW

- do not rerun check for -Wstrict-aliasing=3 every time

In contrast to every other compiler flag this has a = in it, which CMake
can't have in a variable name.

- only read the interesting strings from curlver.h

Reviewed-by: Peter Wu

Closes https://github.com/curl/curl/pull/4975
2020-02-29 23:14:16 -05:00
Steve Holme
a2ad278756
polarssl: Additional removal
Follow up to 6357a19f.

Reviewed-by: Daniel Stenberg
Closes #5004
2020-03-01 00:28:46 +00:00
Marcel Raad
295ea5f641
CMake: support specifying the target Windows version
Previously, it was only possible to set it to Windows Vista or XP by
setting the option `ENABLE_INET_PTON` to `ON` resp. `OFF`.
Use a new cache variable `CURL_TARGET_WINDOWS_VERSION` to be able to
explicitly set the target Windows version. `ENABLE_INET_PTON` is
ignored in this case.

Ref: https://github.com/curl/curl/pull/1639#issuecomment-313039352
Ref: https://github.com/curl/curl/pull/4607#issuecomment-557541456
Closes https://github.com/curl/curl/pull/4815
2020-01-20 09:44:19 +01:00
Marcel Raad
be578eea7e
CMake: use check_symbol_exists also for inet_pton
It doesn't make much sense to only check if the function can be linked
when it's not declared in any header and that is treated as an error.
With the correct target Windows version set, the function is declared
in ws2tcpip.h and the comment above the modified block is invalid.

Also, move the definition of `_WIN32_WINNT` up to before all symbol
availability checks so that we don't have to care which ones must be
done after it.

Tested with Visual Studio 2019 and current MinGW-w64.

Closes https://github.com/curl/curl/pull/4808
2020-01-14 19:43:00 +01:00
Tobias Hieta
4ccf7622db
CMake: Add support for CMAKE_LTO option.
This enables Link Time Optimization. LTO is a proven technique for
optimizing across compilation units.

Closes #4799
2020-01-13 23:14:49 +01:00
Marc Aldorasi
ea6d6205d9 cmake: Enable SMB for Windows builds
- Define USE_WIN32_CRYPTO by default. This enables SMB.

- Show whether SMB is enabled in the "Enabled features" output.

- Fix mingw compiler warning for call to CryptHashData by casting away
  const param. mingw CryptHashData prototype is wrong.

Closes https://github.com/curl/curl/pull/4717
2020-01-11 18:10:47 -05:00
Peter Wu
87b9337c8f CMake: add support for building with the NSS vtls backend
Options are cross-checked with configure.ac and acinclude.m4.
Tested on Arch Linux, untested on other platforms like Windows or macOS.

Closes #4663
Reviewed-by: Kamil Dudka
2019-12-04 21:34:02 +00:00
Michael Forney
9b879160df
TLS: add BearSSL vtls implementation
Closes #4597
2019-11-26 08:32:23 +01:00
Paul B. Omta
df85b86a92 build: Remove unused HAVE_LIBSSL and HAVE_LIBCRYPTO defines
Closes https://github.com/curl/curl/pull/4460
2019-10-05 19:18:30 -04:00
Rolf Eike Beer
3e7769a580
CMake: use platform dependent name for dlopen() library
Closes #4279
2019-08-31 11:39:47 +02:00
Daniel Stenberg
b889408500
curl: support parallel transfers
This is done by making sure each individual transfer is first added to a
linked list as then they can be performed serially, or at will, in
parallel.

Closes #3804
2019-07-20 19:14:16 +02:00
aasivov
2527eca91e cmake: Fix finding Brotli on case-sensitive file systems
- Find package "Brotli" instead of "BROTLI" since the former is the
  casing used for CMake/FindBrotli.cmake, and otherwise find_package
  may fail on a case-sensitive file system.

Fixes https://github.com/curl/curl/issues/4117
2019-07-17 02:03:29 -04:00
Daniel Stenberg
48016832dc
Revert "cmake: add SMB to list of disabled protocols if HTTP_ONLY is specified"
This reverts commit 36738caeb7.

Apparently several of the appveyor windows builds broke.
2019-06-11 15:19:47 +02:00
sergey-raevskiy
36738caeb7
cmake: add SMB to list of disabled protocols if HTTP_ONLY is specified
Reviewed-by: Jakub Zakrzewski
Closes #3770
2019-06-11 09:28:18 +02:00
Daniel Stenberg
c9c4f7b547
configure/cmake: check for if_nametoindex()
- adds the check to cmake

- fixes the configure check to work for cross-compiled windows builds

Closes #3917
2019-05-22 09:49:19 +02:00
Daniel Stenberg
e91e481612
libcurl: #ifdef away more code for disabled features/protocols 2019-05-17 23:24:34 +02:00
Simon Warta
dc5ac786d9
cmake: rename CMAKE_USE_DARWINSSL to CMAKE_USE_SECTRANSP
Closes https://github.com/curl/curl/pull/3769
2019-04-27 11:51:23 +02:00
Jakub Zakrzewski
ff1cb97517 cmake: clear CMAKE_REQUIRED_LIBRARIES after each use
This fixes GSSAPI builds with the libraries in a non-standard location.
The testing for recv() were failing because it failed to link
the Kerberos libraries, which are not needed for this or subsequent
tests.

fixes #3743
closes #3744
2019-04-10 19:12:28 +02:00
Jakub Zakrzewski
639cfeb0f8 cmake: minor cleanup
- Remove nneeded include_regular_expression.
  It was setting what is already a default.

- Remove duplicated include.

- Don't check for pre-3.0.0 CMake version.
  We already require at least 3.0.0, so it's just clutter.

Ref: #3744
2019-04-10 19:12:28 +02:00
Simon Warta
cd3edb0827
cmake: set SSL_BACKENDS
This groups all SSL backends into the feature "SSL" and sets the
SSL_BACKENDS analogue to configure.ac

Closes https://github.com/curl/curl/pull/3736
2019-04-06 17:54:41 +02:00
Simon Warta
1a3aa5c321
cmake: don't run SORT on empty list
In case of an empty list, SORTing leads to the cmake error "list
sub-command SORT requires list to be present."

Closes https://github.com/curl/curl/pull/3736
2019-04-06 17:53:03 +02:00
Sergei Nikulov
99c2e7e554 cmake: updated check for HAVE_POLL_FINE to match autotools 2019-01-16 11:39:34 +03:00
Sergei Nikulov
52e27fe9c6 cmake: added checks for HAVE_VARIADIC_MACROS_C99 and HAVE_VARIADIC_MACROS_GCC 2019-01-11 22:48:54 +03:00
Ruslan Baratov
07e8ff102f
cmake: use lowercase for function name like the rest of the code
Reviewed-by: Sergei Nikulov

closes #3196
2018-12-24 22:59:33 +01:00
Konstantin Kushnir
a39d8f7056 CMake: fix MIT/Heimdal Kerberos detection
- fix syntax error in FindGSS.cmake
- correct krb5 include directory. FindGSS exports
  "GSS_INCLUDE_DIR" variable.

Closes https://github.com/curl/curl/pull/3316
2018-11-29 02:05:21 -05:00
Daniel Stenberg
302d125b42
axtls: removed
As has been outlined in the DEPRECATE.md document, the axTLS code has
been disabled for 6 months and is hereby removed.

Use a better supported TLS library!

Assisted-by: Daniel Gustafsson
Closes #3194
2018-11-01 10:29:53 +01:00
Ruslan Baratov
98d9a33de4
cmake: Remove unused CURL_CONFIG_HAS_BEEN_RUN_BEFORE variable
Closes #3191
2018-10-30 11:23:00 +01:00
Tuomo Rinne
e97679a360
cmake: uniform ZLIB to use USE_ variable and clean curl-config.cmake.in
Closes #3123
2018-10-29 17:10:31 +01:00
Tuomo Rinne
fc0672b447
cmake: add support for transitive ZLIB target 2018-10-29 17:10:24 +01:00
Ruslan Baratov
b04e624038
cmake: remove unused variables
Remove variables:
* HAVE_SOCKLEN_T
* CURL_SIZEOF_CURL_SOCKLEN_T
* CURL_TYPEOF_CURL_SOCKLEN_T

Closes #3166
2018-10-25 13:18:23 +02:00
Marcel Raad
97cde94043
CMake: remove BOM
Accidentally aded in commit 1bb86057ff.

Reported-by: Viktor Szakats
Ref: https://github.com/curl/curl/pull/3120#issuecomment-428673136
2018-10-11 09:15:24 +02:00
Marcel Raad
1bb86057ff
CMake: disable -Wpedantic-ms-format
As done in the autotools build. This is required for MinGW, which
supports only %I64 for printing 64-bit values, but warns about it.

Closes https://github.com/curl/curl/pull/3120
2018-10-10 17:29:58 +02:00
dmitrykos
667b5721c7 cmake: test and set missed defines during configuration
Added configuration checks for HAVE_BUILTIN_AVAILABLE and HAVE_CLOCK_GETTIME_MONOTONIC.

Closes #3097
2018-10-05 13:10:41 +03:00
Ruslan Baratov
69328490fc CMake: Improve config installation
Use 'GNUInstallDirs' standard module to set destinations of installed
files.

Use uppercase "CURL" names instead of lowercase "curl" to match standard
'FindCURL.cmake' CMake module:
* https://cmake.org/cmake/help/latest/module/FindCURL.html

Meaning:
* Install 'CURLConfig.cmake' instead of 'curl-config.cmake'
* User should call 'find_package(CURL)' instead of 'find_package(curl)'

Use 'configure_package_config_file' function to generate
'CURLConfig.cmake' file. This will make 'curl-config.cmake.in' template
file smaller and handle components better.  E.g.  current configuration
report no error if user specified unknown components (note: new
configuration expects no components, report error if user will try to
specify any).

Closes https://github.com/curl/curl/pull/2849
2018-10-01 16:16:29 -04:00
Brad King
518ed51ec7 cmake: Backport to work with CMake 3.0 again
Changes in commit 7867aaa9a0 (cmake: link curl to the OpenSSL targets
instead of lib absolute paths, 2018-07-17) and commit f826b4ce98 (cmake:
bumped minimum version to 3.4, 2018-07-19) required CMake 3.4 to fix
issue #2746.  This broke support for users on older versions of CMake
even if they just want to build curl and do not care whether transitive
dependencies work.

Backport the logic to work with CMake 3.0 again by implementing the
fix only when the version of CMake is at least 3.4.
2018-09-28 14:18:00 +03:00
Ruslan Baratov
c892795ea3
CMake: Respect BUILD_SHARED_LIBS
Use standard CMake variable BUILD_SHARED_LIBS instead of introducing
custom option CURL_STATICLIB.

Use '-DBUILD_SHARED_LIBS=%SHARED%' in appveyor.yml.

Reviewed-by: Sergei Nikulov
Closes #2755
2018-08-08 09:39:05 +02:00
John Butterfield
f826b4ce98
cmake: bumped minimum version to 3.4
Closes #2753
2018-08-08 09:36:30 +02:00
John Butterfield
7867aaa9a0
cmake: link curl to the OpenSSL targets instead of lib absolute paths
Reviewed-by: Jakub Zakrzewski
Reviewed-by: Sergei Nikulov
Closes #2753
2018-08-08 09:35:27 +02:00
Ruslan Baratov
d1207c07d0
CMake: Update scripts to use consistent style
Closes #2727
Reviewed-by: Sergei Nikulov
2018-07-17 11:54:07 +02:00
Ruslan Baratov
e0a4bba730
CMake: remove redundant and old end-of-block syntax
Reviewed-by: Jakub Zakrzewski
Closes #2715
2018-07-09 23:32:57 +02:00
Ruslan Baratov
b4db3a8a07
CMake: Remove unused 'output_var' from 'collect_true'
Variable 'output_var' is not used and can be removed.
Function 'collect_true' renamed to 'count_true'.
2018-07-06 09:35:28 +02:00
Raphael Gozzo
59b284b6eb
cmake: allow multiple SSL backends
This will make possible to select the SSL backend (using
curl_global_sslset()) even when the libcurl is built using CMake

Closes #2665
2018-06-21 09:48:26 +02:00
Daniel Stenberg
38203f1585
openssl: assume engine support in 1.0.1 or later
Previously it was checked for in configure/cmake, but that would then
leave other build systems built without engine support.

While engine support probably existed prior to 1.0.1, I decided to play
safe. If someone experience a problem with this, we can widen the
version check.

Fixes #2641
Closes #2644
2018-06-11 10:20:18 +02:00
Viktor Szakats
ebd213270a curl.rc: embed manifest for correct Windows version detection
* enable it in `src/Makefile.m32`
* enable it in `winbuild/MakefileBuild.vc` if a custom manifest is
  _not_ enabled via the existing `EMBED_MANIFEST` option
* enable it for all Windows CMake builds (also disable the built-in
  minimal manifest, added by CMake by default.)

For other build systems, add the `-DCURL_EMBED_MANIFEST` option to
the list of RC (Resource Compiler) flags to enable the manifest
included in `src/curl.rc`. This may require to disable whatever
automatic or other means in which way another manifest is added to
`curl.exe`.

Notice that Borland C doesn't support this method due to a
long-pending resource compiler bug. Watcom C may also not handle
it correctly when the `-zm` `wrc` option is used (this option may
be unnecessary though) and regardless of options in certain earlier
revisions of the 2.0 beta version.

Closes https://github.com/curl/curl/pull/1221
Fixes https://github.com/curl/curl/issues/2591
2018-05-30 12:08:26 +00:00
Bernhard Walle
645948dffb
cmake: check for getpwuid_r
The autotools-based build system does it, so we do it also in CMake.

Bug: #2609
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
2018-05-28 15:23:18 +02:00
maxed
7e93637acd Fix the test for fsetxattr and strerror_r tests in CMake to work without compiling 2018-05-28 08:05:16 +03:00
Sergei Nikulov
2c0225e042 cmake: set -d postfix for debug builds if not specified
using -DCMAKE_DEBUG_POSTFIX explicitly

       fixes #2121, obsoletes #2384
2018-05-24 17:25:41 +03:00
Michał Janiszewski
bea18c7f39 cmake: Add advapi32 as explicit link library for win32
ARM targets need advapi32 explicitly.

Closes #2363
2018-03-27 16:22:37 +03:00
Sergei Nikulov
66e93802e6
cmake: avoid warn-as-error during config checks (#2411)
- Move the CURL_WERROR option processing after the configuration checks
  to avoid failures in case of warnings during the configuration checks.

This is a partial fix for #2358
2018-03-22 16:34:49 +03:00
Don
d22e5e02a2
cmake: add support for brotli
Currently CMake cannot detect Brotli support. This adds detection of the
libraries and associated header files. It also adds this to the
generated config.

Closes #2392
2018-03-19 08:28:32 +01:00
Jay Satiro
908a9a6742 build: remove HAVE_LIMITS_H check
.. because limits.h presence isn't optional, it's required by C89.

Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2

Closes https://github.com/curl/curl/pull/2215
2018-01-05 23:34:30 -05:00
John Starks
2e850dafa5 cmake: Add missing setmode check
Ensure HAVE_SETMODE is set to 1 on OSes that have setmode. Without this,
curl will corrupt binary files when writing them to stdout on Windows.

Closes https://github.com/curl/curl/pull/2067
2017-11-10 15:38:23 -05:00
Dmitri Tikhonov
d531f33ba2 timeval: use mach time on MacOS
If clock_gettime() is not supported, use mach_absolute_time() on MacOS.

closes #2033
2017-10-30 15:27:46 +01:00
Jakub Zakrzewski
1cb4f5d6e8 cmake: Export libcurl and curl targets to use by other cmake projects
The config files define curl and libcurl targets as imported targets
CURL::curl and CURL::libcurl. For backward compatibility with CMake-
provided find-module the CURL_INCLUDE_DIRS and CURL_LIBRARIES are
also set.

Closes #1879
2017-10-28 17:22:47 +02:00
Daniel Stenberg
62a721ea47
openssl: enable PKCS12 support for !BoringSSL
Enable PKCS12 for all non-boringssl builds without relying on configure
or cmake checks.

Bug: https://curl.haxx.se/mail/lib-2017-10/0007.html
Reported-by: Christian Schmitz
Closes #1948
2017-10-09 11:29:53 +02:00
Sergei Nikulov
440dbcb06e cmake: disable tests and man generation if perl/nroff not found
Fixes https://github.com/curl/curl/issues/1500
Reported-by: Jay Satiro

Fixes https://github.com/curl/curl/pull/1662
Assisted-by: Tom Seddon
Assisted-by: dpull@users.noreply.github.com
Assisted-by: elelel@users.noreply.github.com

Closes https://github.com/curl/curl/pull/1924
2017-10-02 01:32:36 -04:00
Daniel Stenberg
b93954261d
cmake: enable picky compiler options with clang and gcc
closes #1799
2017-08-20 23:32:32 +02:00
Daniel Stenberg
1286b7c09e
cmake: sizeof curl_off_t, remove unused detections 2017-08-17 10:26:59 +02:00
Benbuck Nason
774d49af52
cmake: remove dead code for DISABLED_THREADSAFE
Closes #1786
2017-08-15 23:40:54 +02:00
Sergei Nikulov
a905e883dc
cmake: Threads detection update. ref: #1702
Closes #1719
2017-08-13 18:07:29 +02:00
Simon Warta
7f9bf5cfd3
cmake: allow user to override CMAKE_DEBUG_POSTFIX
Closes #1763
2017-08-12 17:37:30 +02:00
Daniel Stenberg
ac8af84527
cmake: move cmake_uninstall.cmake to CMake/
Closes #1756
2017-08-10 15:05:49 +02:00
Marcel Raad
54aef857b3
CMake: fix CURL_WERROR for MSVC
When using CURL_WERROR in MSVC builds, the debug flags were overridden
by the release flags and /WX got added twice in debug mode.

Closes https://github.com/curl/curl/pull/1715
2017-08-04 12:01:24 +02:00
Marcel Raad
866e02935d
CMake: set MSVC warning level to 4
The MSVC warning level defaults to 3 in CMake. Change it to 4, which is
consistent with the Visual Studio and NMake builds. Disable level 4
warning C4127 for the library and additionally C4306 for the test
servers to get a clean CURL_WERROR build as that warning is raised in
some macros in older Visual Studio versions.

Ref: https://github.com/curl/curl/pull/1667#issuecomment-314082794
Closes https://github.com/curl/curl/pull/1711
2017-08-03 08:39:23 +02:00
jasjuang
27e2a4733c cmake: support make uninstall
Closes #1674
2017-07-30 01:56:14 +02:00
Paul Harris
45f39945ec cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.

Closes #1649
2017-07-07 14:29:26 +02:00
Daniel Stenberg
ce81aeb877 cmake: add CURL_WERROR for enabling "warning as errors" 2017-07-06 17:06:24 +02:00
Hannes Magnusson
75c3596f75 cmake: remove spurious "-l" from linker flags
Fixes #1552
2017-07-06 12:21:20 +02:00
Daniel Stenberg
9ee6cb1b77 cmake: if inet_pton is used, bump _WIN32_WINNT
... and make sure inet_pton is always checked for when *not* using Windows,
which is a regression from 4fc6ebe18.

Idea-by: Sergei Nikulov
2017-07-05 13:28:28 +02:00
Per Malmberg
4fc6ebe18a cmake: Added compatibility options for older Windows versions
CURL_STATIC_CRT and ENABLE_INET_PTON

Closes #1621
2017-07-02 01:02:22 +02:00
Daniel Stenberg
73a2fcea0b includes: remove curl/curlbuild.h and curl/curlrules.h
Rely entirely on curl/system.h now.

Introduced in Aug 2008 with commit 14240e9e10. Now gone.

Fixes #1456
2017-06-14 11:07:33 +02:00
TheAssassin
01596dbadf cmake: Fix inconsistency regarding mbed TLS include directory
Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the
headers, but the system complained that mbed TLS wasn't found due to
MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit
attempts to fix that.

Closes https://github.com/curl/curl/pull/1541
2017-06-08 18:30:09 -04:00
Akhil Kedia
b4d6b99445 cmake: fix build on Ubuntu 14.04
Fixed a syntax error with setting cache variables (The type and
docstring were missing), resulting in build errors.  Quoted the
CURL_CA_PATH and CURL_CA_BUNDLE otherwise the path was written without
quotes in C code, resulting in build errors.

Closes #1503

Signed-off-by: Akhil <akhil.kedia@samsung.com>
2017-05-23 10:07:08 +02:00
Simon Warta
fab9629133 cmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED 2017-05-21 23:20:12 +02:00
Simon Warta
2ea297564d cmake: remove CURL_CA_BUNDLE from cmake TODO 2017-05-21 23:20:12 +02:00
Simon Warta
6a9489dc45 cmake: auto detection of CURL_CA_BUNDLE/CURL_CA_PATH
Closes #1461
2017-05-21 23:19:59 +02:00
Simon Warta
8256cce2c7 cmake: add CURL_CA_BUNDLE/CURL_CA_FALLBACK/CURL_CA_PATH options 2017-05-21 23:19:16 +02:00
Peter Wu
84a226a30b cmake: build manual pages (including curl.1)
Also make Perl mandatory to allow building the docs.

While CMakeLists.txt could probably read the list of manual pages from
Makefile.am, actually putting those in CMakeLists.txt is cleaner so that
is what is done here.

Fixes #1230
Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Michael Maltese
813263dc3a CMake: Set at most one SSL library
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
c6a97466b9 CMake: Add mbedTLS support
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
eb19e89f2e CMake: Add DarwinSSL support
Assisted-by: Simon Warta <simon@kullo.net>
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
f85ff14d52 CMake: Reorganize SSL support, separate WinSSL and SSPI
This is closer to how configure.ac does it

Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Simon Warta
bbc81c46e8 cmake: Replace invalid UTF-8 byte sequence
- Change the encoding of the regex temp placeholder token to UTF-8.

Prior to this change the file contained special chars in a different
encoding than ASCII or UTF-8 making text editors and Python complain
when reading the file.

Closes https://github.com/curl/curl/pull/1271
Closes https://github.com/curl/curl/pull/1275
2017-02-25 02:31:05 -05:00
Sean Burford
1c877a0712 cmake: Support curl --xattr when built with cmake
- Test for and set HAVE_FSETXATTR when support for extended file
  attributes is present.

Closes https://github.com/curl/curl/pull/1176
2017-02-01 01:11:52 -05:00
Jiri Malak
192466e086 cmake: 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.

Closes https://github.com/curl/curl/pull/1195
2017-01-09 20:49:45 -05:00
Kyselgov E.N
1b711ca107 cmake: use crypt32.lib when building with OpenSSL on windows
Reviewed-by: Peter Wu
Closes #1149
Fixes #1147
2016-12-27 22:20:19 +01:00
Peter Wu
6aa9cfa2b9 cmake: disable poll for macOS
Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce.

Fixes #1089
2016-11-06 15:16:52 +01:00
Daniel Stenberg
9c91ec7781 idn: switch to libidn2 use and IDNA2008 support
CVE-2016-8625

Bug: https://curl.haxx.se/docs/adv_20161102K.html
Reported-by: Christian Heimes
2016-10-31 08:46:35 +01:00
Daniel Stenberg
0f1996321f s/cURL/curl
The tool was never called cURL, only the project. But even so, we have
more and more over time switched to just use lower case.
2016-10-18 13:59:54 +02:00
Remo E
d522ff4690 cmake: add nghttp2 support
Closes #922
2016-10-10 19:47:31 +02:00
Daniel Stenberg
de71e68000 openssl: don’t call CRYTPO_cleanup_all_ex_data
The OpenSSL function CRYTPO_cleanup_all_ex_data() cannot be called
multiple times without crashing - and other libs might call it! We
basically cannot call it without risking a crash. The function is a
no-op since OpenSSL 1.1.0.

Not calling this function only risks a small memory leak with OpenSSL <
1.1.0.

Bug: https://curl.haxx.se/mail/lib-2016-09/0045.html
Reported-by: Todd Short
2016-09-19 11:33:14 +02:00
Peter Wu
2f3feda273 cmake: fix curl-config --static-libs
The `curl-config --static-libs` command should not output paths like
-l/usr/lib/libssl.so, instead print the absolute path without `-l`.

This also removes the confusing message "Static linking is broken" which
was printed because curl-config --static-libs was disfunctional even
though the static libcurl.a library works properly.

Fixes https://github.com/curl/curl/issues/841
2016-09-11 13:13:19 +02:00
Jakub Zakrzewski
6140dfcf3e CMake: Try to (un-)hide private library symbols
Detect support for compiler symbol visibility flags and apply those
according to CURL_HIDDEN_SYMBOLS option.
It should work true to the autotools build except it tries to unhide
symbols on Windows when requested and prints warning if it fails.

Ref: https://github.com/curl/curl/issues/981#issuecomment-242665951
Reported-by: Daniel Stenberg
2016-09-10 00:35:38 +02:00
Jay Satiro
82617e7499 cmake: Enable win32 threaded resolver by default
- Turn on USE_THREADS_WIN32 in Windows if ares isn't on

This change is similar to what we already do in the autotools build.
2016-08-08 02:37:29 -04:00
Jay Satiro
11049e007a cmake: Enable win32 large file support by default
All compilers used by cmake in Windows should support large files.

- Add test SIZEOF_OFF_T
- Remove outdated test SIZEOF_CURL_OFF_T
- Turn on USE_WIN32_LARGE_FILES in Windows
- Check for 'Largefile' during the features output
2016-08-08 00:25:03 -04:00
Yonggang Luo
2bbed9c4f0 cmake: Fix for schannel support
The check_library_exists_concat do not check crypt32 library properly.
So include it directly.

Bug: https://github.com/curl/curl/pull/917
Reported-by: Yonggang Luo

Bug: https://github.com/curl/curl/issues/935
Reported-by: Alain Danteny
2016-07-28 03:36:13 -04:00
Sergei Nikulov
12e21fab26 cmake: now using BUILD_TESTING=ON/OFF
CMake build now using BUILD_TESTING=ON/OFF (default is OFF) to build
tests and enabling CTest integration. Options BUILD_CURL_TESTS and
BUILD_DASHBOARD_REPORTS was removed.

Closes #882

Reviewed-by: Brad King
2016-06-21 23:04:04 +02:00
Sergei Nikulov
b70ca5281d cmake: Fix build with winldap
Bug: https://github.com/curl/curl/pull/874
Reported-by: Sergei Nikulov
2016-06-15 14:09:38 -04:00
Andrew Kurushin
6cabd78531 schannel: add CURLOPT_CERTINFO support
Closes #822
2016-06-01 08:50:01 +02:00
Daniel Stenberg
4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00