#
043523a8 |
| 12-Dec-2023 |
Viktor Szakats |
cmake: delete obsolete TODOs more [ci skip] - manual completed: 898b012a9bf388590c4be7f526815b5ab74feca1 #1288 - soname completed: 5de6848f104d7cb0017080e31216265ac19d0dde #10023 - b
cmake: delete obsolete TODOs more [ci skip] - manual completed: 898b012a9bf388590c4be7f526815b5ab74feca1 #1288 - soname completed: 5de6848f104d7cb0017080e31216265ac19d0dde #10023 - bunch of others that are completed - `NTLM_WB_ENABLED` is implemented in a basic form, and now also scheduled for removal, so a TODO at this point isn't useful. And this 'to-check' item: Q: "The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not." A: With CMake, since 2ebc74c36a19a1700af394c16855ce144d9878e3 #11546 and fc9bfb14520712672b4784e8b48256fb29204011 #11627, we explicitly enable PIC for libcurl shared lib. Or when building libcurl for shared and static lib in a single pass. We do this by default for Windows or when enabled by the user via `SHARE_LIB_OBJECT`. Otherwise we don't touch this setting. Meaning the default set by CMake (if any) or the toolchain is used. On Debian Bookworm, this means that PIC is disabled for static libs by default. Some platforms (like macOS), has PIC enabled by default. autotools supports the double-pass mode only, and in that case CMake seems to match PIC behaviour now (as tested on Linux with gcc.) Follow-up to 5d5dfdbd1a6c40bd75e982b66f49e1fa3a7eeae7 #12500 Reviewed-by: Jay Satiro Closes #12509
show more ...
|
#
5d5dfdbd |
| 10-Dec-2023 |
Viktor Szakats |
cmake: delete obsolete TODO items [ci skip] There is always room for improvement, but CMake is up to par now with autotools, so there is no longer a good reason to keep around these
cmake: delete obsolete TODO items [ci skip] There is always room for improvement, but CMake is up to par now with autotools, so there is no longer a good reason to keep around these inline TODO items. Answering one of questions: Q: "The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options." A: CMake offers the `CMAKE_BUILD_TYPE` variable to control debug info and optimization level. E.g.: - `Release` = `-O3` + no debug info - `MinSizeRel` = `-Os` + no debug info - `Debug` = `-O0` + debug info https://stackoverflow.com/questions/48754619/what-are-cmake-build-type-debug-release-relwithdebinfo-and-minsizerel/59314670#59314670 https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#default-and-custom-configurations For picky warnings we have the `PICKY_COMPILER` options, enabled by default. Closes #12500
show more ...
|
#
0f3f3843 |
| 01-Dec-2023 |
Jay Satiro |
build: fix Windows ADDRESS_FAMILY detection - Include winsock2.h for Windows ADDRESS_FAMILY detection. Prior to this change cmake detection didn't work because it included ws2de
build: fix Windows ADDRESS_FAMILY detection - Include winsock2.h for Windows ADDRESS_FAMILY detection. Prior to this change cmake detection didn't work because it included ws2def.h by itself, which is missing needed types from winsock2.h. Prior to this change autotools detection didn't work because it did not include any Windows header. In both cases libcurl would fall back on unsigned short as the address family type, which is the same as ADDRESS_FAMILY. Co-authored-by: Viktor Szakats Closes https://github.com/curl/curl/pull/12441
show more ...
|
#
a2e75af3 |
| 06-Dec-2023 |
Chris Sauer |
cmake: fix typo Follow-up to aace27b Closes #12464
|
#
03cb1ff4 |
| 23-Nov-2023 |
Daniel Stenberg |
fopen: create new file using old file's mode Because the function renames the temp file to the target name as a last step, if the file was previously owned by a different user, not ORing
fopen: create new file using old file's mode Because the function renames the temp file to the target name as a last step, if the file was previously owned by a different user, not ORing the old mode could otherwise end up creating a file that was no longer readable by the original owner after save. Reported-by: Loïc Yhuel Fixes #12299 Closes #12395
show more ...
|
#
33493db2 |
| 17-Nov-2023 |
Viktor Szakats |
cmake: add test for `DISABLE` options, add `CURL_DISABLE_HEADERS_API` - tests: verify CMake `DISABLE` options. Make an exception for 2 CMake-only ones, and one more that's u
cmake: add test for `DISABLE` options, add `CURL_DISABLE_HEADERS_API` - tests: verify CMake `DISABLE` options. Make an exception for 2 CMake-only ones, and one more that's using a different naming scheme, also in autotools and source. - cmake: add support for `CURL_DISABLE_HEADERS_API`. Suggested-by: Daniel Stenberg Ref: https://github.com/curl/curl/pull/12345#pullrequestreview-1736238641 Closes #12353
show more ...
|
#
ab50027d |
| 15-Nov-2023 |
Viktor Szakats |
tidy-up: casing typos, delete unused Windows version aliases - cmake: fix casing of `UnixSockets` to match the rest of the codebase. - curl-compilers.m4: fix casing in a comment.
tidy-up: casing typos, delete unused Windows version aliases - cmake: fix casing of `UnixSockets` to match the rest of the codebase. - curl-compilers.m4: fix casing in a comment. - setup-win32: delete unused Windows version constant aliases. Reviewed-by: Marcel Raad Closes #12351
show more ...
|
#
20bb363f |
| 16-Nov-2023 |
Viktor Szakats |
cmake: add `CURL_DISABLE_BINDLOCAL` option To match similar autotools option. Default is `ON`. Reviewed-by: Daniel Stenberg Closes #12345
|
#
ff1fdfec |
| 11-Nov-2023 |
Viktor Szakats |
tidy-up: dedupe Windows system libs in cmake Reviewed-by: Daniel Stenberg Closes #12307
|
#
aace27b0 |
| 06-Nov-2023 |
Charlie C |
cmake: option to disable install & drop `curlu` target when unused This patch makes the following changes: - adds the option `CURL_DISABLE_INSTALL` - to disable 'install' targets. -
cmake: option to disable install & drop `curlu` target when unused This patch makes the following changes: - adds the option `CURL_DISABLE_INSTALL` - to disable 'install' targets. - Removes the target `curlu` when the option `BUILD_TESTING` is set to `OFF` - to prevent it from being loaded in Visual Studio. Closes #12287
show more ...
|
#
60359ad5 |
| 06-Nov-2023 |
Viktor Szakats |
build: delete `HAVE_STDINT_H` and `HAVE_INTTYPES_H` We use `stdint.h` unconditionally in all places except one. These uses are imposed by external dependencies / features. nghttp2, quic,
build: delete `HAVE_STDINT_H` and `HAVE_INTTYPES_H` We use `stdint.h` unconditionally in all places except one. These uses are imposed by external dependencies / features. nghttp2, quic, wolfSSL and `HAVE_MACH_ABSOLUTE_TIME` do require this C99 header. It means that any of these features make curl require a C99 compiler. (In case of MSVC, this means Visual Studio 2010 or newer.) This patch changes the single use of `stdint.h` guarded by `HAVE_STDINT_H` to use `stdint.h` unconditionally. Also stop using `inttypes.h` as an alternative there. `HAVE_INTTYPES_H` wasn't used anywhere else, allowing to delete this feature check as well. Closes #12275
show more ...
|
#
960d6014 |
| 28-Oct-2023 |
Viktor Szakats |
build: require Windows XP or newer After this patch we assume availability of `getaddrinfo` and `freeaddrinfo`, first introduced in Windows XP. Meaning curl now requires building for
build: require Windows XP or newer After this patch we assume availability of `getaddrinfo` and `freeaddrinfo`, first introduced in Windows XP. Meaning curl now requires building for Windows XP as a minimum. TODO: assume these also in autotools. Ref: https://github.com/curl/curl/pull/12221#issuecomment-1783761806 Closes #12225
show more ...
|
#
a426b505 |
| 13-Oct-2023 |
Viktor Szakats |
build: variadic macro tidy-ups - delete unused `HAVE_VARIADIC_MACROS_C99/GCC` feature checks. (both autotools and CMake.) - delete duplicate `NULL` check in `Curl_trc_cf_infof()`.
build: variadic macro tidy-ups - delete unused `HAVE_VARIADIC_MACROS_C99/GCC` feature checks. (both autotools and CMake.) - delete duplicate `NULL` check in `Curl_trc_cf_infof()`. - fix compiler warning in `CURL_DISABLE_VERBOSE_STRINGS` builds. ``` ./lib/cf-socket.c:122:41: warning: unused parameter 'data' [-Wunused-parameter] static void nosigpipe(struct Curl_easy *data, ^ ``` - fix `#ifdef` comments in `lib/curl_trc.{c,h}`. - fix indentation in some `infof()` calls. Follow-up to dac293cfb7026b1ca4175d88b80f1432d3d3c684 #12167 Cherry-picked from #12105 Closes #12210
show more ...
|
#
191e695f |
| 26-Oct-2023 |
Viktor Szakats |
cmake: speed up threads setup for Windows Win32 threads are always available. We enabled them unconditionally (with `ENABLE_THREADED_RESOLVER`). CMake built-in thread detection logic
cmake: speed up threads setup for Windows Win32 threads are always available. We enabled them unconditionally (with `ENABLE_THREADED_RESOLVER`). CMake built-in thread detection logic has this condition hard-coded for Windows as well (since at least 2007). Instead of doing all the work of detecting pthread combinations on Windows, then discarding those results, skip these efforts and assume built-in thread support when building for Windows. This saves 1-3 slow CMake configuration steps. Reviewed-by: Daniel Stenberg Closes #12202
show more ...
|
#
c5d506e9 |
| 25-Oct-2023 |
Viktor Szakats |
cmake: speed up zstd detection Before this patch we detected the presence of a specific zstd API to see if we can use the library. zstd published that API in its first stable release
cmake: speed up zstd detection Before this patch we detected the presence of a specific zstd API to see if we can use the library. zstd published that API in its first stable release: v1.0.0 (2016-08-31). Replace that method by detecting the zstd library version instead and accepting if it's v1.0.0 or newer. Also display this detected version and display a warning if the zstd found is unfit for curl. We use the same version detection method as zstd itself, via its public C header. This deviates from autotools which keeps using the slow method of looking for the API by building a test program. The outcome is the same as long as zstd keeps offering this API. Ref: https://github.com/facebook/zstd/commit/5a0c8e24395079f8e8cdc90aa1659cd5ab1b7427 (2016-08-12, committed) Ref: https://github.com/facebook/zstd/releases/tag/v0.8.1 (2016-08-18, first released) Ref: https://github.com/facebook/zstd/releases/tag/v1.0.0 Reviewed-by: Daniel Stenberg Closes #12200
show more ...
|
#
2100d9fd |
| 05-Oct-2023 |
Viktor Szakats |
cmake: pre-fill rest of detection values for Windows The goal of this patch is to avoid unnecessary feature detection work when doing Windows builds with CMake. Do this by pre-filling we
cmake: pre-fill rest of detection values for Windows The goal of this patch is to avoid unnecessary feature detection work when doing Windows builds with CMake. Do this by pre-filling well-known detection results for Windows and specifically for mingw-w64 and MSVC compilers. Also limit feature checks to platforms where the results are actually used. Drop a few redundant ones. And some tidying up. - pre-fill remaining detection values in Windows CMake builds. Based on actual detection results observed in CI runs, preceding similar work over libssh2 and matching up values with `lib/config-win32.h`. This brings down CMake configuration time from 58 to 14 seconds on the same local machine. On AppVeyor CI this translates to: - 128 seconds -> 50 seconds VS2022 MSVC with OpenSSL (per CMake job): https://ci.appveyor.com/project/curlorg/curl/builds/48208419/job/4gw66ecrjpy7necb#L296 https://ci.appveyor.com/project/curlorg/curl/builds/48217440/job/8m4fwrr2fe249uo8#L186 - 62 seconds -> 16 seconds VS2017 MINGW (per CMake job): https://ci.appveyor.com/project/curlorg/curl/builds/48208419/job/s1y8q5ivlcs7ub29?fullLog=true#L290 https://ci.appveyor.com/project/curlorg/curl/builds/48217440/job/pchpxyjsyc9kl13a?fullLog=true#L194 The formula is about 1-3 seconds delay for each detection. Almost all of these trigger a full compile-link cycle behind the scenes, slow even today, both cross and native, mingw-w64 and apparently MSVC too. Enabling .map files or other custom build features slows it down further. (Similar is expected for autotools configure.) - stop detecting `idn2.h` if idn2 was deselected. autotools does this. - stop detecting `idn2.h` if idn2 was not found. This deviates from autotools. Source code requires both header and lib, so this is still correct, but faster. - limit `ADDRESS_FAMILY` detection to Windows. - normalize `HAVE_WIN32_WINNT` value to lowercase `0x0a12` format. - pre-fill `HAVE_WIN32_WINNT`-dependent detection results. Saving 4 (slow) feature-detections in most builds: `getaddrinfo`, `freeaddrinfo`, `inet_ntop`, `inet_pton` - fix pre-filled `HAVE_SYS_TIME_H`, `HAVE_SYS_PARAM_H`, `HAVE_GETTIMEOFDAY` for mingw-w64. Luckily this do not change build results, as `WIN32` took priority over `HAVE_GETTIMEOFDAY` with the current source code. - limit `HAVE_CLOCK_GETTIME_MONOTONIC_RAW` and `HAVE_CLOCK_GETTIME_MONOTONIC` detections to non-Windows. We're not using these in the source code for Windows. - reduce compiler warning noise in CMake internal logs: - fix to include `winsock2.h` before `windows.h`. Apply it to autotools test snippets too. - delete previous `-D_WINSOCKAPI_=` hack that aimed to fix the above. - cleanup `CMake/CurlTests.c` to emit less warnings. - delete redundant `HAVE_MACRO_SIGSETJMP` feature check. It was the same check as `HAVE_SIGSETJMP`. - delete 'experimental' marking from `CURL_USE_OPENSSL`. - show CMake version via `CMakeLists.txt`. Credit to the `zlib-ng` project for the idea: https://github.com/zlib-ng/zlib-ng/blob/61e181c8ae93dbf56040336179c9954078bd1399/CMakeLists.txt#L7 - make `CMake/CurlTests.c` pass `checksrc`. - `CMake/WindowsCache.cmake` tidy-ups. - replace `WIN32` guard with `_WIN32` in `CMake/CurlTests.c`. Closes #12044
show more ...
|
#
f4ff4108 |
| 19-Oct-2023 |
Daniel Stenberg |
configure: check for the fseeko declaration too ... and make the code require both symbol and declaration. This is because for Android, the symbol is always present in the lib at
configure: check for the fseeko declaration too ... and make the code require both symbol and declaration. This is because for Android, the symbol is always present in the lib at build-time even when not actually available in run-time. Assisted-by: Viktor Szakats Reported-by: 12932 on github Fixes #12086 Closes #12158
show more ...
|
#
514969db |
| 19-Oct-2023 |
Viktor Szakats |
cmake: fix OpenSSL quic detection in quiche builds An orphan call to `CheckQuicSupportInOpenSSL()` remained after a recent update when checking QUIC for quiche. Move back QUIC detection
cmake: fix OpenSSL quic detection in quiche builds An orphan call to `CheckQuicSupportInOpenSSL()` remained after a recent update when checking QUIC for quiche. Move back QUIC detection to a function and fixup callers to use that. Also make sure that quiche gets QUIC from BoringSSL, because it doesn't support other forks at this time. Regression from dee310d54261f9a8416e87d50bccfe2cbe404949 #11555 Reported-by: Casey Bodley <cbodley@redhat.com> Fixes #12160 Closes #12162
show more ...
|
#
e160d17a |
| 15-Oct-2023 |
Jay Satiro |
build: fix 'threadsafe' feature detection for older gcc - Add 'threadsafe' to the feature list shown during build if POSIX threads are being used. This is a follow-up to 5adb6
build: fix 'threadsafe' feature detection for older gcc - Add 'threadsafe' to the feature list shown during build if POSIX threads are being used. This is a follow-up to 5adb6000 which added support for building a thread-safe libcurl with older versions of gcc where atomic is not available but pthread is. Reported-by: Dan Fandrich Co-authored-by: Dan Fandrich Fixes https://github.com/curl/curl/issues/12125 Closes https://github.com/curl/curl/pull/12127
show more ...
|
#
84a65791 |
| 09-Oct-2023 |
Viktor Szakats |
cmake: replace `check_library_exists_concat()` The idea of `check_library_exists_concat()` is that it detects an optional component and adds it to the list of libs that we also use in
cmake: replace `check_library_exists_concat()` The idea of `check_library_exists_concat()` is that it detects an optional component and adds it to the list of libs that we also use in subsequent component checks. This caused problems when detecting components with unnecessary dependencies that were not yet built. CMake offers the `CMAKE_REQUIRED_LIBRARIES` variable to set libs used for component checks, which we already use in most cases. That left 4 uses of `check_library_exists_concat()`. Only one of these actually needed the 'concat' feature (ldap/lber). Delete this function and replace it with standard `check_library_exists()` and manual management of our `CURL_LIBS` list we use when linking build targets. And special logic to handle the ldap/lber case. (We have a similar function for headers: `check_include_file_concat()`. It works, but problematic for performance reasons and because it hides the actual headers required in `check_symbol_exists()` calls.) Ref: #11537 #11558 Fixes #11285 Fixes #11648 Closes #12070
show more ...
|
#
0e4bef08 |
| 08-Oct-2023 |
Viktor Szakats |
h3: add support for ngtcp2 with AWS-LC builds ``` curl 8.4.0-DEV (x86_64-apple-darwin) libcurl/8.4.0-DEV (SecureTransport) AWS-LC/1.15.0 nghttp2/1.56.0 ngtcp2/0.19.1 nghttp3/0.15.0 R
h3: add support for ngtcp2 with AWS-LC builds ``` curl 8.4.0-DEV (x86_64-apple-darwin) libcurl/8.4.0-DEV (SecureTransport) AWS-LC/1.15.0 nghttp2/1.56.0 ngtcp2/0.19.1 nghttp3/0.15.0 Release-Date: [unreleased] Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss Features: alt-svc AsynchDNS HSTS HTTP2 HTTP3 HTTPS-proxy IPv6 Largefile MultiSSL NTLM SSL threadsafe UnixSockets ``` Also delete an obsolete GnuTLS TODO and update the header comment in `FindNGTCP2.cmake`. Reviewed-by: Daniel Stenberg Closes #12066
show more ...
|
#
58a95b6a |
| 08-Oct-2023 |
Viktor Szakats |
build: do not publish `HAVE_BORINGSSL`, `HAVE_AWSLC` macros Syncing this up with CMake. Source code uses the built-in `OPENSSL_IS_AWSLC` and `OPENSSL_IS_BORINSSL` macros to dete
build: do not publish `HAVE_BORINGSSL`, `HAVE_AWSLC` macros Syncing this up with CMake. Source code uses the built-in `OPENSSL_IS_AWSLC` and `OPENSSL_IS_BORINSSL` macros to detect BoringSSL and AWS-LC. No help is necessary from the build tools. The one use of `HAVE_BORINGSSL` in the source turned out to be no longer necessary for warning-free BoringSSL + Schannel builds. Ref: #1610 #2634 autotools detects this anyway for display purposes. CMake detects this to decide whether to use the BoringSSL-specific crypto lib with ngtcp2. It detects AWS-LC, but doesn't use the detection result just yet (planned in #12066). Ref: #11964 Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes #12065
show more ...
|
#
8bc474fa |
| 05-Oct-2023 |
Viktor Szakats |
cmake: re-add missed C89 headers for specific detections We removed C89 `setjmp.h` and `signal.h` detections and excluded them from the global header list we use when detecting functions
cmake: re-add missed C89 headers for specific detections We removed C89 `setjmp.h` and `signal.h` detections and excluded them from the global header list we use when detecting functions [1]. Then missed to re-add these headers to the specific functions which need them to be detected [2]. Fix this omission in this patch. [1] Follow-up to 3795fcde995d96db641ddbcc8a04f9f0f03bef9f #11951 [2] Follow-up to 96c29900bcec32dd6bc8e9857c8871ff4b8b8ed9 #11940 Closes #12043
show more ...
|
#
751e168d |
| 03-Oct-2023 |
Viktor Szakats |
cmake: improve OpenLDAP builds - cmake: detect OpenLDAP based on function `ldap_init_fd`. autotools does this. autotools also publishes this detection result in `HAVE_LDAP_INIT_F
cmake: improve OpenLDAP builds - cmake: detect OpenLDAP based on function `ldap_init_fd`. autotools does this. autotools also publishes this detection result in `HAVE_LDAP_INIT_FD`. We don't mimic that with CMake as the source doesn't use this value. (it might need to be remove-listed in `scripts/cmp-config.pl` for future OpenLDAP test builds.) This also deletes existing self-declaration method via the CMake-specific `CURL_USE_OPENLDAP` configuration. - cmake: define `LDAP_DEPRECATED=1` for OpenLDAP. Like autotools does. This fixes a long list of these warnings: ``` /usr/local/opt/openldap/include/ldap.h:1049:5: warning: 'LDAP_DEPRECATED' is not defined, evaluates to 0 [-Wundef] ``` - cmake: delete LDAP TODO comment no longer relevant. Also: - autotools: replace domain name `dummy` with `0.0.0.0` in LDAP feature detection functions. Ref: #11964 (effort to sync cmake detections with autotools) Closes #12024
show more ...
|
#
ff9f57bd |
| 03-Oct-2023 |
Viktor Szakats |
cmake: delete old `HAVE_LDAP_URL_PARSE` logic Left there by accident after adding proper detection for this. Follow-up to 772f0d8edf1c3c2745543f42388ccec5a16ee2c0 #12006 Re
cmake: delete old `HAVE_LDAP_URL_PARSE` logic Left there by accident after adding proper detection for this. Follow-up to 772f0d8edf1c3c2745543f42388ccec5a16ee2c0 #12006 Ref: #11964 (effort to sync cmake detections with autotools) Closes #12015
show more ...
|