History log of /curl/CMakeLists.txt (Results 101 – 125 of 405)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# db073c9d 13-Mar-2023 Viktor Szakats

build: fix stdint/inttypes detection with non-autotools

Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

build: fix stdint/inttypes detection with non-autotools

Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

`lib/config-win32.h` builds (e.g. `Makefile.mk`):
- set `HAVE_STDINT_H` where supported.
- set `HAVE_INTTYPES_H` for MinGW.

CMake:
- auto-detect them on Windows. (They were both force-disabled.)
- delete unused `CURL_PULL_STDINT_H`.
- delete unused `CURL_PULL_INTTYPES_H`.
- stop detecting `HAVE_STDINT_H` twice.
Present since the initial CMake commit: 4c5307b45655ba75ab066564afdc0c111a8b9291

curl doesn't use these C99 headers, we need them now to workaround
broken wolfSSL builds. Ref: #10739

Once that clears up, we can delete these detections and macros (unless
we want to keep them for future us.)

Reviewed-by: Daniel Stenberg
Closes #10745

show more ...


# 8cfc936f 05-Mar-2023 Viktor Szakats

cmake: fix enabling LDAPS on Windows

Before this patch, enabling LDAPS required a manual C flag:
https://github.com/curl/curl-for-win/blob/c1cfc31cfc04f24f7a4f946564d6f0e1b4d7dd36/curl-c

cmake: fix enabling LDAPS on Windows

Before this patch, enabling LDAPS required a manual C flag:
https://github.com/curl/curl-for-win/blob/c1cfc31cfc04f24f7a4f946564d6f0e1b4d7dd36/curl-cmake.sh#L105

Fix this and enable LDAPS automatically when using `wldap32` (and
when not explicitly disabled). This matches autotools and `Makefile.mk`
behavior. Also remove issue from KNOWN_BUGS.

Add workaround for MSVS 2010 warning triggered by LDAPS now enabled
in more CI tests:
`ldap.c(360): warning C4306: 'type cast' : conversion from 'int' to 'void *' of greater size`
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/46408284/job/v8mwl9yfbmoeqwlr#L312

Reported-by: JackBoosY on github
Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Fixes #6284
Closes #10674

show more ...


# 016c62c4 05-Mar-2023 Viktor Szakats

cmake: skip CA-path/bundle auto-detection in cross-builds

Also remove issue from KNOWN_BUGS.

Reported-by: Cristian Morales Vega
Reviewed-by: Marcel Raad
Fixes #6178
Clos

cmake: skip CA-path/bundle auto-detection in cross-builds

Also remove issue from KNOWN_BUGS.

Reported-by: Cristian Morales Vega
Reviewed-by: Marcel Raad
Fixes #6178
Closes #10676

show more ...


# cab04024 17-Feb-2023 Jay Satiro

curl_setup: Suppress OpenSSL 3 deprecation warnings

- Define OPENSSL_SUPPRESS_DEPRECATED.

OpenSSL 3 has deprecated some of the functions libcurl uses such as
those with DES, MD5

curl_setup: Suppress OpenSSL 3 deprecation warnings

- Define OPENSSL_SUPPRESS_DEPRECATED.

OpenSSL 3 has deprecated some of the functions libcurl uses such as
those with DES, MD5 and ENGINE prefix. We don't have replacements for
those functions so the warnings were disabled in autotools and cmake
builds, but still showed in other builds.

Closes https://github.com/curl/curl/pull/10543

show more ...


# f5a88f29 28-Jan-2023 ALittleDruid <297957399@qq.com>

cmake: fix Windows check for CryptAcquireContext

Check for CryptAcquireContext in windows.h and wincrypt.h only, since
otherwise this check may fail due to third party headers not found.

cmake: fix Windows check for CryptAcquireContext

Check for CryptAcquireContext in windows.h and wincrypt.h only, since
otherwise this check may fail due to third party headers not found.

Closes https://github.com/curl/curl/pull/10353

show more ...


# c0958b7e 25-Jan-2023 Viktor Szakats

cmake: delete redundant macro definition `SECURITY_WIN32`

Stop explicitly defining `SECURITY_WIN32` in CMake builds.

No other build systems define this macro, because it's unconditi

cmake: delete redundant macro definition `SECURITY_WIN32`

Stop explicitly defining `SECURITY_WIN32` in CMake builds.

No other build systems define this macro, because it's unconditionally
defined in `lib/curl_sspi.h` already. This is the only curl source using
the `sspi.h` and `security.h` Win32 headers, and no other Win32 headers
need this macro.

Reviewed-by: Jay Satiro
Closes #10341

show more ...


# 71cc27f0 09-Jan-2023 Marc Aldorasi

cmake: use list APPEND syntax for CMAKE_REQUIRED_DEFINITIONS

- Use list() instead of set() for CMAKE_REQUIRED_DEFINITIONS list since
the former is clearer.

Closes https://gith

cmake: use list APPEND syntax for CMAKE_REQUIRED_DEFINITIONS

- Use list() instead of set() for CMAKE_REQUIRED_DEFINITIONS list since
the former is clearer.

Closes https://github.com/curl/curl/pull/10272

show more ...


# ac6e7f56 17-Jan-2023 xgladius

cmake: Remove deprecated symbols check

curl stopped use of CMAKE_USE_ as a prefix for its own build symbols in
2021 and added a check, meant to last 1 year, to fatally error on those

cmake: Remove deprecated symbols check

curl stopped use of CMAKE_USE_ as a prefix for its own build symbols in
2021 and added a check, meant to last 1 year, to fatally error on those
symbols. This commit removes that check.

Closes https://github.com/curl/curl/pull/10314

show more ...


# 2bc1d775 02-Jan-2023 Daniel Stenberg

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- save

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205

show more ...


# f86894a3 02-Jan-2023 Daniel Stenberg

cmake: check for sendmsg

Used by ngtcp2

Closes #10211


# dfbe035c 26-Dec-2022 Daniel Stenberg

cmake: bump requirement to 3.7

Because this is the cmake version (released in November 2016) that
introduced GREATER_EQUAL, which is used already.

Reported-by: nick-telia on git

cmake: bump requirement to 3.7

Because this is the cmake version (released in November 2016) that
introduced GREATER_EQUAL, which is used already.

Reported-by: nick-telia on github
Fixes #10128
Closes #10161

show more ...


# 5ee81c39 24-Dec-2022 Yurii Rashkovskii

cmake: fix the snprintf detection

I haven't had the time to check other configurations, but on my macOS
Ventura 13.1 with XCode 14.2 cmake does not find `snprintf`.

Solution: en

cmake: fix the snprintf detection

I haven't had the time to check other configurations, but on my macOS
Ventura 13.1 with XCode 14.2 cmake does not find `snprintf`.

Solution: ensure stdio.h is checked for definitions

Closes #10155

show more ...


# fe3463eb 27-Nov-2022 Jay Satiro

build: assume errno.h is always available

- Remove errno.h detection from all build configurations.

errno.h is a standard header according to C89.

Closes https://github.com

build: assume errno.h is always available

- Remove errno.h detection from all build configurations.

errno.h is a standard header according to C89.

Closes https://github.com/curl/curl/pull/9986

show more ...


# 57d3477e 27-Nov-2022 Jay Satiro

build: assume assert.h is always available

- Remove assert.h detection from all build configurations.

assert.h is a standard header according to C89.

I had proposed this se

build: assume assert.h is always available

- Remove assert.h detection from all build configurations.

assert.h is a standard header according to C89.

I had proposed this several years ago as part of a larger change that
was abandoned.

Ref: https://github.com/curl/curl/issues/1237#issuecomment-277500720

Closes https://github.com/curl/curl/pull/9985

show more ...


# 52279c8e 02-Dec-2022 Jakub Zakrzewski

CMake: fix build with `CURL_USE_GSSAPI`

CMAKE_*_LINKER_FLAGS must be a string but GSS_LINKER_FLAGS is a list, so
we need to replace semicolons with spaces when setting those.

Fi

CMake: fix build with `CURL_USE_GSSAPI`

CMAKE_*_LINKER_FLAGS must be a string but GSS_LINKER_FLAGS is a list, so
we need to replace semicolons with spaces when setting those.

Fixes #9017
Closes #1022

show more ...


# 55807e6c 25-Nov-2022 Stefan Eissing

tls: backends use connection filters for IO, enabling HTTPS-proxy

- OpenSSL (and compatible)
- BearSSL
- gnutls
- mbedtls
- rustls
- schannel
- secure-transpor

tls: backends use connection filters for IO, enabling HTTPS-proxy

- OpenSSL (and compatible)
- BearSSL
- gnutls
- mbedtls
- rustls
- schannel
- secure-transport
- wolfSSL (v5.0.0 and newer)

This leaves only the following without HTTPS-proxy support:
- gskit
- nss
- wolfSSL (versions earlier than v5.0.0)

Closes #9962

show more ...


# edae6c66 01-Nov-2022 Viktor Szakats

lib: sync guard for Curl_getaddrinfo_ex() definition and use

`Curl_getaddrinfo_ex()` gets _defined_ with `HAVE_GETADDRINFO` set. But,
`hostip4.c` _used_ it with `HAVE_GETADDRINFO_THREADS

lib: sync guard for Curl_getaddrinfo_ex() definition and use

`Curl_getaddrinfo_ex()` gets _defined_ with `HAVE_GETADDRINFO` set. But,
`hostip4.c` _used_ it with `HAVE_GETADDRINFO_THREADSAFE` set alone. It
meant a build with the latter, but without the former flag could result
in calling this function but not defining it, and failing to link.

Patch this by adding an extra check for `HAVE_GETATTRINFO` around the
call.

Before this patch, build systems prevented this condition. Now they
don't need to.

While here, simplify the related CMake logic on Windows by setting
`HAVE_GETADDRINFO_THREADSAFE` to the detection result of
`HAVE_GETADDRINFO`. This expresses the following intent clearer than
the previous patch and keeps the logic in a single block of code:
When we have `getaddrinfo()` on Windows, it's always threadsafe.

Follow-up to 67d88626d44ec04b9e11dca4cfbf62cd29fe9781

Reviewed-by: Jay Satiro
Closes #9734

show more ...


# b563a92c 01-Nov-2022 Viktor Szakats

tidy-up: process.h detection and use

This patch aims to cleanup the use of `process.h` header and the macro
`HAVE_PROCESS_H` associated with it.

- `process.h` is always availabl

tidy-up: process.h detection and use

This patch aims to cleanup the use of `process.h` header and the macro
`HAVE_PROCESS_H` associated with it.

- `process.h` is always available on Windows. In curl, it is required
only for `_beginthreadex()` in `lib/curl_threads.c`.

- `process.h` is also available in MS-DOS. In curl, its only use was in
`lib/smb.c` for `getpid()`. But `getpid()` is in fact declared by
`unistd.h`, which is always enabled via `lib/config-dos.h`. So the
header is not necessary.

- `HAVE_PROCESS_H` was detected by CMake, forced to 1 on Windows and
left to real detection for other platforms.
It was also set to always-on in `lib/config-win32.h` and
`lib/config-dos.h`.
In autotools builds, there was no detection and the macro was never
set.

Based on these observations, in this patch we:

- Rework Windows `getpid` logic in `lib/smb.c` to always use the
equivalent direct Win32 API function `GetCurrentProcessId()`, as we
already did for Windows UWP apps. This makes `process.h` unnecessary
here on Windows.

- Stop #including `process.h` into files where it was not necessary.
This is everywhere, except `lib/curl_threads.c`.

> Strangely enough, `lib/curl_threads.c` compiled fine with autotools
> because `process.h` is also indirecty included via `unistd.h`. This
> might have been broken in autotools MSVC builds, where the latter
> header is missing.

- Delete all remaining `HAVE_PROCESS_H` feature guards, for they were
unnecessary.

- Delete `HAVE_PROCESS_H` detection from CMake and predefined values
from `lib/config-*.h` headers.

Reviewed-by: Jay Satiro
Closes #9703

show more ...


# 811c799f 26-Oct-2022 Viktor Szakats

cmake: really enable warnings with clang

Even though `PICKY_COMPILER=ON` is the default, warnings were not
enabled when using llvm/clang, because `CMAKE_COMPILER_IS_CLANG` was
always

cmake: really enable warnings with clang

Even though `PICKY_COMPILER=ON` is the default, warnings were not
enabled when using llvm/clang, because `CMAKE_COMPILER_IS_CLANG` was
always false (in my tests at least).

This is the single use of this variable in curl, and in a different
place we already use `CMAKE_C_COMPILER_ID MATCHES "Clang"`, which works
as expected, so change the condition to use that instead.

Also fix the warnings uncovered by the above:

- lib: add casts to silence clang warnings

- schannel: add casts to silence clang warnings in ALPN code

Assuming the code is correct, solve the warnings with a cast.
This particular build case isn't CI tested.

There is a chance the warning is relevant for some platforms, perhaps
Windows 32-bit ARM7.

Closes #9783

show more ...


# b51560b9 26-Oct-2022 Viktor Szakats

winidn: drop WANT_IDN_PROTOTYPES

`WANT_IDN_PROTOTYPES` was necessary to avoid using a header that came
via an optional package. MS stopped distributing this package some
years ago an

winidn: drop WANT_IDN_PROTOTYPES

`WANT_IDN_PROTOTYPES` was necessary to avoid using a header that came
via an optional package. MS stopped distributing this package some
years ago and the winidn definitions are part of standard headers (via
`windows.h`) since Vista.

Auto-detect Vista inside `lib/idn_win32.c` and enable the manual
definitions if building for an older Windows.

This allows to delete this manual knob from all build-systems.

Also drop the `_SAL_VERSION` sub-case:

Our manual definitions are now only enabled with old systems. We assume
that code analysis is not run on such systems, allowing us to delete the
SAL-friendly flavour of these.

Reviewed-by: Jay Satiro
Closes #9793

show more ...


# 86988251 02-Oct-2022 Jeremy Maitin-Shepard

cmake: improve usability of CMake build as a sub-project

- Renames `uninstall` -> `curl_uninstall`
- Ensures all export rules are guarded by CURL_ENABLE_EXPORT_TARGET

Closes #96

cmake: improve usability of CMake build as a sub-project

- Renames `uninstall` -> `curl_uninstall`
- Ensures all export rules are guarded by CURL_ENABLE_EXPORT_TARGET

Closes #9638

show more ...


# 86f2d8f6 14-Oct-2022 Viktor Szakats

cmake: set HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID on Windows

`lib/config-win32.h` enables this configuration option unconditionally.
Make it apply to CMake builds as well.

While here,

cmake: set HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID on Windows

`lib/config-win32.h` enables this configuration option unconditionally.
Make it apply to CMake builds as well.

While here, delete a broken check for
`HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` from `CMakeLists.txt`. This came with
the initial commit [1], but did not include the actual verification code
inside `CMake/CurlTests.c`, so it always failed. A later commit [2]
added a second test, for non-Windows platforms.

Enabling this flag causes test 1056 to fail with CMake builds, as they
do with autotools builds. Let's apply the same solution and ignore the
results here as well.

[1] 4c5307b45655ba75ab066564afdc0c111a8b9291
[2] aec7c5a87c8482b6ddffa352d7d220698652262e

Reviewed-by: Daniel Stenberg
Assisted-by: Marcel Raad

Closes #9726

show more ...


# 67d88626 14-Oct-2022 Viktor Szakats

cmake: set HAVE_GETADDRINFO_THREADSAFE on Windows

autotools enables this configuration option unconditionally for Windows
[^1]. Do the same in CMake.

The above will make this wo

cmake: set HAVE_GETADDRINFO_THREADSAFE on Windows

autotools enables this configuration option unconditionally for Windows
[^1]. Do the same in CMake.

The above will make this work for all reasonably recent environments.
The logic present in `lib/config-win32.h` [^2] has the following
exceptions which we did not cover in this CMake update:

- Builds targeting Windows 2000 and earlier
- MS Visual C++ 5.0 (1997) and earlier

Also make sure to disable this feature when `HAVE_GETADDRINFO` isn't
set, to avoid a broken build. We might want to handle that in the C
sources in a future commit.

[^1]: https://github.com/curl/curl/blob/68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6/m4/curl-functions.m4#L2067-L2070

[^2]: https://github.com/curl/curl/blob/68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6/lib/config-win32.h#L511-L528

Closes #9727

show more ...


# 790779fc 14-Oct-2022 Viktor Szakats

cmake: sync HAVE_SIGNAL detection with autotools

`HAVE_SIGNAL` means the availability of the `signal()` function in
autotools, while in CMake it meant the availability of that function

cmake: sync HAVE_SIGNAL detection with autotools

`HAVE_SIGNAL` means the availability of the `signal()` function in
autotools, while in CMake it meant the availability of that function
_and_ the symbol `SIGALRM`.

The latter is not available on Windows, but the function is, which means
on Windows, autotools did define `HAVE_SIGNAL`, but CMake did not,
introducing a slight difference into the binaries.

This patch syncs CMake behaviour with autotools to look for the function
only.

The logic came with the initial commit adding CMake support to curl, so
the commit history doesn't reveal the reason behind it. In any case,
it's best to check the existence of `SIGALRM` directly in the source
before use. For now, curl builds fine with `HAVE_SIGNAL` enabled and
`SIGALRM` missing.

Follow-up to 68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6

Closes #9725

show more ...


# 1d64a2bf 14-Oct-2022 Viktor Szakats

cmake: delete duplicate HAVE_GETADDRINFO test

A custom `HAVE_GETADDRINFO` check came with the initial CMake commit
[1]. A later commit [2] added a standard check for it as well. The

cmake: delete duplicate HAVE_GETADDRINFO test

A custom `HAVE_GETADDRINFO` check came with the initial CMake commit
[1]. A later commit [2] added a standard check for it as well. The
standard check run before the custom one, so CMake ignored the latter.

The custom check was also non-portable, so this patch deletes it in
favor of the standard check.

[1] 4c5307b45655ba75ab066564afdc0c111a8b9291
[2] aec7c5a87c8482b6ddffa352d7d220698652262e

Closes #9731

show more ...


12345678910>>...17