summaryrefslogtreecommitdiff
path: root/CMake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: remove `HAVE_WINSOCK_H` definitionMarcel Raad2021-09-292-21/+0
| | | | | | It's not used anymore. Closes https://github.com/curl/curl/pull/7795
* Revert "build: remove checks for WinSock 1"Daniel Stenberg2021-09-292-0/+21
| | | | | | | | Due to CI issues This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc. Closes #7790
* build: remove checks for WinSock 1Marcel Raad2021-09-282-21/+0
| | | | | | It's not supported anymore. Closes https://github.com/curl/curl/pull/7778
* cmake: avoid poll() on macOSDaniel Stenberg2021-08-241-0/+4
| | | | | | | | | ... like we do in configure builds. Since poll() on macOS is not reliable enough. Reported-by: marc-groundctl Fixes #7595 Closes #7619
* Get rid of the unused HAVE_SIG_ATOMIC_T et. al.Dan Fandrich2021-07-231-22/+0
| | | | It was added in 2006 but I see no evidence it was ever used.
* misc: copyright year range updatesDaniel Stenberg2021-07-191-1/+1
|
* build: fix IoctlSocket FIONBIO checkAndrea Pappacoda2021-07-161-1/+1
| | | | | | | Prior to this change HAVE_IOCTLSOCKET_CAMEL_FIONBIO mistakenly checked for (lowercase) ioctlsocket when it should have checked for IoctlSocket. Closes https://github.com/curl/curl/pull/7375
* configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_rGergely Nagy2021-06-182-45/+5
| | | | Closes #7276
* configure/cmake: remove checks for unused inet_ntoa and inet_ntoa_rGergely Nagy2021-06-182-35/+0
| | | | Closes #7276
* configure/cmake: remove unused define HAVE_PERRORGergely Nagy2021-06-181-1/+0
| | | | Closes #7276
* configure/cmake: remove checks for unused sgtty.hGergely Nagy2021-06-181-1/+0
| | | | Closes #7276
* cmake: try well-known send/recv signature for AppleGregor Jasny2021-06-011-64/+78
| | | | | | | | | | | | | | | | | | | | | | | | The CMake `try_compile` command is especially slow for the Xcode generator. With this patch applied it first tests for the currently used (and Open Group specified) send/recv signature. In case this fails testing falls-back to the permutations. speed-up: ``` time cmake .. -GNinja -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF before: 11.64s user 11.09s system 55% cpu 40.754 total after: 7.84s user 6.57s system 51% cpu 28.074 total ``` ``` time cmake .. -GXcode -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DCMAKE_USE_LIBSSH2=OFF before: 217.07s user 104.15s system 60% cpu 8:51.79 total after: 108.76s user 51.80s system 58% cpu 4:32.58 total ``` Closes #7158
* configure: remove use of RETSIGTYPEMichael Forney2021-04-072-20/+1
| | | | | | | | | | | This was previously defined by the obsolete AC_TYPE_SIGNAL macro, which was removed in 2682e5f5. The deprecation text says > Your code may safely assume C89 semantics that RETSIGTYPE is void. So, remove it and just use void instead. Closes #6861
* build: delete unused feature guardsViktor Szakats2021-02-231-3/+1
| | | | | | | | | | - `HAVE_STRNCASECMP` - `HAVE_TCGETATTR` - `HAVE_TCSETATTR` Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #6645
* cmake: make CURL_ZLIB a tri-state variableCristian Morales Vega2020-11-191-0/+11
| | | | | | | | | By differentiating between ON and AUTO it can make a missing zlib library a hard error when CURL_ZLIB=ON is used. Reviewed-by: Jakub Zakrzewski Closes #6221 Fixes #6173
* cmake: don't pass -fvisibility=hidden to clang-cl on WindowsTobias Hieta2020-11-101-1/+1
| | | | | | | | | | | | | When using clang-cl on windows -fvisibility=hidden is not an known argument. Instead it behaves exactly like MSVC in this case. So let's make sure we take that path. In CMake clang-cl sets both CMAKE_C_COMPILER_ID=clang and MSVC get's defined since clang-cl is basically a MSVC emulator. So guarding like we do in this patch seems logical. Reviewed-by: Jakub Zakrzewski Closes #6194
* copyright: fix year rangesDaniel Stenberg2020-11-051-1/+1
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-0422-22/+22
| | | | Closes #6172
* content_encoding: add zstd decoding supportGilles Vollant2020-07-121-0/+69
| | | | | | | | | include zstd curl patch for Makefile.m32 from vszakats and include Add CMake support for zstd from Peter Wu Helped-by: Viktor Szakats Helped-by: Peter Wu Closes #5453
* CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)Peter Wu2020-05-103-0/+257
| | | | | | | | | | | | | | | | | | | | | | Add three new CMake Find modules (using the curl license, but I grant others the right to apply the CMake BSD license instead). This CMake config is simpler than the autotools one because it assumes ngtcp2 and nghttp3 to be used together. Another difference is that this CMake config checks whether QUIC is actually supported by the TLS library (patched OpenSSL or boringssl) since this can be a common configuration mistake that could result in build errors later. Unlike autotools, CMake does not warn you that the features are experimental. The user is supposed to already know that and read the documentation. It requires a very special build environment anyway. Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure out which features (libldap-2.4, libssh2) to disable due to conflicts with boringssl. Closes #5359
* cmake: Avoid MSVC C4273 warnings in send/recv checksBrad King2020-04-141-0/+6
| | | | | | | | | | | | | | | We use `check_c_source_compiles` to check possible send/recv signatures by reproducing the forward declarations from system headers. On Windows the `winsock2.h` header adds dll linkage settings to its forward declaration. If ours does not match the compiler warns: warning C4273: 'recv': inconsistent dll linkage Add `WINSOCK_API_LINKAGE` to our test signatures when it is defined so that our linkage is consistent with that from `winsock2.h`. Fixes #4764 Closes #5232
* copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg2020-03-2417-0/+357
| | | | | | | | | Reported by the new script 'scripts/copyright.pl'. The script has a regex whitelist for the files that don't need copyright headers. Removed three (mostly usesless) README files from docs/ Closes #5141
* cmake: add support for building with wolfSSLbagder/cmake-wolfsslDaniel Stenberg2020-03-161-0/+13
| | | | | | | | | My working build cmdline: $ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON . Assisted-by: Brad King Closes #5095
* CMake: clean up and improve build proceduresRolf Eike Beer2020-02-297-58/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* cmake: Improve libssh2 check on Windowsnicoguillier2020-01-111-1/+1
| | | | | | | | | | | | | - Add "libssh2" name to FindLibSSH2 library search. On Windows systems, libSSH2 CMake installation may name the library "LibSSH2". Prior to this change cmake only checked for name "ssh2". On Linux that works fine because it will prepend the "lib", but it doesn't do that on Windows. Closes https://github.com/curl/curl/pull/4804
* CMake: add support for building with the NSS vtls backendPeter Wu2019-12-041-0/+15
| | | | | | | | 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
* TLS: add BearSSL vtls implementationMichael Forney2019-11-261-0/+9
| | | | Closes #4597
* copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz2019-11-021-1/+1
| | | | Closes #4547
* build: Remove unused HAVE_LIBSSL and HAVE_LIBCRYPTO definesPaul B. Omta2019-10-051-1/+0
| | | | Closes https://github.com/curl/curl/pull/4460
* CMake: remove needless newlines at end of gss variablesRolf Eike Beer2019-08-311-0/+4
|
* CMake: fix typos and spellingDaniel Gustafsson2019-07-092-3/+3
|
* CMake: Convert errant elseif() to else()Kyle Edwards2019-07-091-1/+1
| | | | | | | | | | | CMake interprets an elseif() with no arguments as elseif(FALSE), resulting in the elseif() block not being executed. That is not what was intended here. Change the empty elseif() to an else() as it was intended. Closes #4101 Reported-by: Artalus <artalus-mail@yandex.ru> Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
* build: fix Codacy warningsMarcel Raad2019-06-051-0/+2
| | | | | | Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
* cmake: restore C89 compatibility of CurlTests.cMarcel Raad2019-05-121-2/+2
| | | | | | | | | I broke it in d1b5cf830bfe169745721b21245d2217d2c2453e and 97de97daefc2ed084c91eff34af2426f2e55e134. Reported-by: Viktor Szakats Ref: https://github.com/curl/curl/commit/97de97daefc2ed084c91eff34af2426f2e55e134#commitcomment-33499044 Closes https://github.com/curl/curl/pull/3868
* CMake: suppress unused variable warningsMarcel Raad2019-05-111-0/+2
| | | | I missed these in commit d1b5cf830bfe169745721b21245d2217d2c2453e.
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-111-0/+4
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* cmake: avoid linking executable for some tests with cmake 3.6+Jakub Zakrzewski2019-04-101-35/+40
| | | | | | | | | | | | With CMAKE_TRY_COMPILE_TARGET_TYPE set to STATIC_LIBRARY, the try_compile() (which is used by check_c_source_compiles()) will build static library instead of executable. This avoids linking additional libraries in and thus speeds up those checks a little. This commit also avoids #3743 (GSSAPI build errors) on itself with cmake 3.6 or above. That issue was fixed separately for all versions. Ref: #3744
* cmake: updated check for HAVE_POLL_FINE to match autotoolsSergei Nikulov2019-01-161-7/+35
|
* cmake: added checks for HAVE_VARIADIC_MACROS_C99 and HAVE_VARIADIC_MACROS_GCCSergei Nikulov2019-01-111-2/+44
|
* CMake: fix MIT/Heimdal Kerberos detectionKonstantin Kushnir2018-11-291-2/+2
| | | | | | | | - fix syntax error in FindGSS.cmake - correct krb5 include directory. FindGSS exports "GSS_INCLUDE_DIR" variable. Closes https://github.com/curl/curl/pull/3316
* cmake: uniform ZLIB to use USE_ variable and clean curl-config.cmake.inTuomo Rinne2018-10-291-9/+6
| | | | Closes #3123
* cmake: add find_dependency call for ZLIB to CMake config fileTuomo Rinne2018-10-291-2/+8
|
* cmake: test and set missed defines during configurationdmitrykos2018-10-051-0/+16
| | | | | | Added configuration checks for HAVE_BUILTIN_AVAILABLE and HAVE_CLOCK_GETTIME_MONOTONIC. Closes #3097
* CMake: Improve config installationRuslan Baratov2018-10-011-58/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* whitespace fixesViktor Szakats2018-09-231-1/+0
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* cmake: don't require OpenSSL if USE_OPENSSL=OFFslodki2018-09-181-2/+2
| | | | | | | | | User must have OpenSSL installed even if not used by libcurl at all since 7.61.1 release. Broken at 7867aaa9a01decf93711428462335be8cef70212 Reviewed-by: Sergei Nikulov Closes #3001
* cmake: link curl to the OpenSSL targets instead of lib absolute pathsJohn Butterfield2018-08-081-0/+5
| | | | | | Reviewed-by: Jakub Zakrzewski Reviewed-by: Sergei Nikulov Closes #2753
* CMake: Update scripts to use consistent styleRuslan Baratov2018-07-178-369/+329
| | | | | Closes #2727 Reviewed-by: Sergei Nikulov
* CMake: remove redundant and old end-of-block syntaxRuslan Baratov2018-07-093-49/+47
| | | | | Reviewed-by: Jakub Zakrzewski Closes #2715
* CMake: Remove unused 'output_var' from 'collect_true'Ruslan Baratov2018-07-061-6/+5
| | | | | Variable 'output_var' is not used and can be removed. Function 'collect_true' renamed to 'count_true'.