History log of /curl/CMake/Macros.cmake (Results 1 – 25 of 28)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c9b54fad 23-Oct-2024 Viktor Szakats

cmake: use `list(APPEND)` on `CURL_INCLUDES`

It does the same as the `set()` used before this patch.
Makes the code easier to read.

Closes #15399


# 9126eb5a 21-Oct-2024 Viktor Szakats

cmake: replace `CURL_*_DIR` with `{PROJECT,CMAKE_CURRENT}_*_DIR`

It reduces the number of synonym variables in the code.
Makes it easier to grok and grep.

- replace `CURL_SOURCE

cmake: replace `CURL_*_DIR` with `{PROJECT,CMAKE_CURRENT}_*_DIR`

It reduces the number of synonym variables in the code.
Makes it easier to grok and grep.

- replace `CURL_SOURCE_DIR`
with `PROJECT_SOURCE_DIR`.

- replace `CURL_BINARY_DIR`
with `PROJECT_BINARY_DIR` or `CMAKE_CURRENT_BINARY_DIR`.

- replace a single use of `CMAKE_BINARY_DIR`
with `PROJECT_BINARY_DIR`.

- replace `CMAKE_CURRENT_*_DIR`
with `PROJECT_*_DIR` where it makes the code more uniform.

- quote an argument (formatting).

Closes #15331

show more ...


# 01a81579 11-Oct-2024 Viktor Szakats

cmake: tidy-ups and rebase fixups

- limit `SIZEOF_SA_FAMILY_T` detection to non-Windows.
- make sure `sys/socket.h` exists before detecting `SIZEOF_SA_FAMILY_T`.
- limit `mach_absolu

cmake: tidy-ups and rebase fixups

- limit `SIZEOF_SA_FAMILY_T` detection to non-Windows.
- make sure `sys/socket.h` exists before detecting `SIZEOF_SA_FAMILY_T`.
- limit `mach_absolute_time()` detection to `APPLE`. Drop from Windows
pre-cache.
- skip `HAVE_LIBSOCKET` detection for Windows, drop pre-cached value.
- drop redundant pre-cached `HAVE_LIBZ` for Windows.
- `curl_required_libpaths()`: stop accepting multiple arguments.
To prepare for `CMAKE_REQUIRED_LINK_DIRECTORIES` support.
Follow-up to 7bab201abe3915a0167c002f9308950cb8a06e4b #15193
- GSS: fix recent rebase mistakes:
- fix variable name.
- do not add a header twice.
Follow-up to 91d451b48809f20415ba8627786f5d4f5aaf8bfe #15157
- GSS: quote a variable.

Closes #15271

show more ...


# 8e345057 05-Oct-2024 Viktor Szakats

cmake: untangle feature detection interdependencies

- reduce `check_include_file_concat()` use to those headers that either
depend on a previously detected header, or another header or

cmake: untangle feature detection interdependencies

- reduce `check_include_file_concat()` use to those headers that either
depend on a previously detected header, or another header or symbol
detection depend on it.

- replace `check_symbol_exists()` with `check_function_exists()` for
functions that are detected with `AC_CHECK_FUNCS()` in `./configure`.
This makes `setmode()` no longer be detected with MSYS, syncing
this with `./configure`. Instead `_setmode()` is used now also in
CMake MSYS builds. This is consistent with Cygwin builds also.

- add comment about which header/symbol detection depends on what
header. Based on `./configure` mainly.

- form `CURL_TEST_DEFINES` manually, and include only those macros which
are actually used in `CMake/CurlTests.c`.

- change `curl_internal_test()` to use `CMAKE_REQUIRED_DEFINITIONS`,
instead of `CMAKE_REQUIRED_FLAGS` to simplify the logic, and to allow
dropping the latter macro completely.

- drop `windows.h` from header and symbol checks.

- `./configure`: add comment about whether `netinet/in6.h`, `sys/un.h`
are indeed meant to be included for all detections. There is a chance
they were added there by accident.

Detection resuls were cross-checked between
436bbbe7abebf0ee3a2b0bfb3ec5db7ce8c8db4c (master) and
48ff4694e608ccfdedf7ce5bab2b96d6b2c23cda (this PR), for CI GHA Linux,
Linux HTTP/3, non-native, macOS and Windows jobs.

Closes #15164

show more ...


# 6074e335 05-Oct-2024 Viktor Szakats

cmake: add comments to feature check options applied globally

Add comments saying when we want values set in feature check option
variables to apply to all feature checks, globally. Thes

cmake: add comments to feature check options applied globally

Add comments saying when we want values set in feature check option
variables to apply to all feature checks, globally. These are currently:
`ws2_32` and `socket` libraries, and `-D_WIN32_WINNT=` macro.

Also use `list(APPEND ...)` for the libraries to avoid overwriting
potentially existing values.

Cherry-picked from #15157
Closes #15253

show more ...


# 7bab201a 08-Oct-2024 Viktor Szakats

cmake: add native `pkg-config` detection for mbedTLS, MSH3, Quiche, Rustls, wolfSSL

Also:
- detect and add required system libraries for Rustls on macOS and
non-Windows.
- add

cmake: add native `pkg-config` detection for mbedTLS, MSH3, Quiche, Rustls, wolfSSL

Also:
- detect and add required system libraries for Rustls on macOS and
non-Windows.
- add Linux CMake jobs for the touched dependencies.
Caveats:
- MSH3 generates a broken `libmsh3.pc`, so needs manual config.
Upstream PR: https://github.com/nibanks/msh3/pull/225
- Rustls `.pc` file missing, so needs manual config.

An internal change worthy of mention is that we are using the lib path
and name information returned by `pkg-config` as-is. Meaning the libname
doesn't include the full path, like it's usual with native cmake
detection. The path comes separately and needs to be rolled separately.
For this we add it to targets via `link_directories()`. We also keep tab
of them in `CURL_LIBDIRS` and use that in `libcurl.pc`. Feature checks
also need to receive these paths. CMake doesn't offer
a `CMAKE_REQUIRED_*` variable for this purpose, only
a `CMAKE_REQUIRED_LINK_OPTIONS` accepting raw linker flags. Add a macro
to convert a list of paths to linker options to solve it. wolfSSL
requires this for now.

Closes #15193

show more ...


# abf737b3 13-Sep-2024 Viktor Szakats

cmake: drop redundant zlib var, rename function (internals)

- drop redundant internal variable `USE_ZLIB`, rely on `HAVE_LIBZ`.

- rename `optional_dependency()` -> `curl_dependency_

cmake: drop redundant zlib var, rename function (internals)

- drop redundant internal variable `USE_ZLIB`, rely on `HAVE_LIBZ`.

- rename `optional_dependency()` -> `curl_dependency_option()`
Make `grep 'option('` hit this option. Namespaced.
It has a single use with `ZLIB`.

Closes #14918

show more ...


# c2889a7b 04-Aug-2024 Viktor Szakats

cmake: more syntax tidy-up

- quote string literals.
In the hope it improves syntax-highlighting and readability.

- use lowercase, underscore-prefixed local var names.
As

cmake: more syntax tidy-up

- quote string literals.
In the hope it improves syntax-highlighting and readability.

- use lowercase, underscore-prefixed local var names.
As a hint for scope, to help readability.

- prefer `pkg_search_module` (over `pkg_check_modules`).
They are the same, but `pkg_search_module` stops searching
at the first hit.

- more `IN LISTS` in `foreach()`.

- OtherTests.cmake: clear `CMAKE_EXTRA_INCLUDE_FILES` after use.

- add `PROJECT_LABEL` for http/client and unit test targets.

- sync `Find*` module comments and formatting.

- drop a few local variables.

- drop bogus `CARES_LIBRARIES` from comment.

- unquote numeric literal.

Follow-up to acbc6b703f6b0ee568d053f6f2565fbc107b5fd3 #14197
Closes #14388

show more ...


# acbc6b70 12-Jul-2024 Viktor Szakats

cmake: tidy-ups

- tidy-up comments.
- use lowercase, underscore prefixed names for internal variables.
- use `IN LISTS` and `IN ITEMS` in `foreach()` loops.
- rename variable nam

cmake: tidy-ups

- tidy-up comments.
- use lowercase, underscore prefixed names for internal variables.
- use `IN LISTS` and `IN ITEMS` in `foreach()` loops.
- rename variable name `OUTPUT` to a more distinctive one.
- tidy-up `STREQUAL` syntax.
- delete commented code.
- indent/whitespace.

Closes #14197

show more ...


# b6089c35 02-Aug-2024 Viktor Szakats

cmake: drop reference to undefined variable

Undefined since the initial commit adding CMake support.

Closes #14358


# f87c3363 02-Aug-2024 Viktor Szakats

cmake: drop custom `CMakeOutput.log`/`CMakeError.log` logs

CMake writes this information into `CMakeConfigureLog.yaml`
automatically.

Closes #14356


# f03c8563 04-Mar-2024 Daniel Stenberg

docs: ascii version of manpage without nroff

Create ASCII version of manpage without nroff

- build src/tool_hugegelp.c from the ascii manpage
- move the the manpage and the as

docs: ascii version of manpage without nroff

Create ASCII version of manpage without nroff

- build src/tool_hugegelp.c from the ascii manpage
- move the the manpage and the ascii version build to docs/cmdline-opts
- remove all use of nroff from the build process
- should make the build entirely reproducible (by avoiding nroff)

- partly reverts 2620aa9 to build libcurl option man pages one by one
in cmake because the appveyor builds got all crazy until I did

The ASCII version of the manpage

- is built with gen.pl, just like the manpage is
- has a right-justified column making the appearance similar to the previous
version
- uses a 4-space indent per level (instead of the old version's 7)
- does not do hyphenation of words (which nroff does)

History

We first made the curl build use nroff for building the hugehelp file in
December 1998, for curl 5.2.

Closes #13047

show more ...


# 68d80a8f 18-Dec-2023 Viktor Szakats

cmake: tidy-up `OtherTests.cmake`

- make more obvious which detection uses which prep steps.
- merge and streamline conditions.
- these should not alter detection results.

A

cmake: tidy-up `OtherTests.cmake`

- make more obvious which detection uses which prep steps.
- merge and streamline conditions.
- these should not alter detection results.

Also align log output messages from
`Macros.cmake` / `curl_internal_test` with rest of the build.

Closes #12551

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 ...


# 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 ...


# ad9bc597 17-May-2022 max.mehl

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869

show more ...


Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0, curl-7_74_0
# f21cc628 19-Nov-2020 Cristian Morales Vega

cmake: make CURL_ZLIB a tri-state variable

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 Z

cmake: make CURL_ZLIB a tri-state variable

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

show more ...


# 4d2f8006 04-Nov-2020 Daniel Stenberg

curl.se: new home

Closes #6172


Revision tags: curl-7_73_0, tiny-curl-7_72_0, curl-7_72_0, curl-7_71_1, curl-7_71_0, curl-7_70_0
# 9a8b3b3e 23-Mar-2020 Daniel Stenberg

copyright: fix out-of-date copyright ranges and missing headers

Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyrigh

copyright: fix out-of-date copyright ranges and missing headers

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

show more ...


Revision tags: curl-7_69_1, curl-7_69_0, curl-7_68_0, curl-7_67_0, curl-7_66_0, curl-7_65_3, curl-7_65_2, curl-7_65_1, curl-7_65_0, curl-7_64_1, curl-7_64_0, curl-7_63_0, curl-7_62_0, curl-7_61_1
# d1207c07 17-Jul-2018 Ruslan Baratov

CMake: Update scripts to use consistent style

Closes #2727
Reviewed-by: Sergei Nikulov


Revision tags: curl-7_61_0
# e0a4bba7 05-Jul-2018 Ruslan Baratov

CMake: remove redundant and old end-of-block syntax

Reviewed-by: Jakub Zakrzewski
Closes #2715


Revision tags: curl-7_60_0, curl-7_59_0, curl-7_58_0, curl-7_57_0, curl-7_56_1, curl-7_56_0
# 440dbcb0 26-Sep-2017 Sergei Nikulov

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/16

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

show more ...


Revision tags: curl-7_55_1, curl-7_55_0, curl-7_54_1, curl-7_54_0, curl-7_53_1, curl-7_53_0, curl-7_52_1, curl-7_52_0, curl-7_51_0, curl-7_50_3, curl-7_50_2, curl-7_50_1, curl-7_50_0, curl-7_49_1, curl-7_49_0, curl-7_48_0, curl-7_47_1, curl-7_47_0, curl-7_46_0, curl-7_45_0, curl-7_44_0, curl-7_43_0, curl-7_42_1, curl-7_42_0, curl-7_41_0, curl-7_40_0
# fba9f41b 14-Nov-2014 Brad King

CMake: Simplify if() conditions on check result variables

Remove use of an old hack that takes advantage of the auto-dereference
behavior of the if() command to detect if a variable is d

CMake: Simplify if() conditions on check result variables

Remove use of an old hack that takes advantage of the auto-dereference
behavior of the if() command to detect if a variable is defined. The
hack has the form:

if("${VAR} MATCHES "^${VAR}$")

where "${VAR}" is a macro argument reference. Use if(DEFINED) instead.
This also avoids warnings for CMake Policy CMP0054 in CMake 3.1.

show more ...


# 5f3824a5 10-Nov-2014 Brad King

CMake: Restore order-dependent library checks

Revert commit 2257deb502 (Cmake: Avoid cycle directory dependencies,
2014-08-22) and add a comment explaining the purpose of the original

CMake: Restore order-dependent library checks

Revert commit 2257deb502 (Cmake: Avoid cycle directory dependencies,
2014-08-22) and add a comment explaining the purpose of the original
code.

The check_library_exists_concat macro is intended to be called multiple
times on a sequence of possibly dependent libraries. Later libraries
may depend on earlier libraries when they are static. They cannot be
safely linked in reverse order on some platforms.

Signed-off-by: Brad King <brad.king@kitware.com>

show more ...


# 1ae06e00 10-Nov-2014 Brad King

CMake: Restore order-dependent header checks

Revert commit 1269df2e3b (Cmake: Don't check for all headers each
time, 2014-08-15) and add a comment explaining the purpose of the
origi

CMake: Restore order-dependent header checks

Revert commit 1269df2e3b (Cmake: Don't check for all headers each
time, 2014-08-15) and add a comment explaining the purpose of the
original code.

The check_include_file_concat macro is intended to be called multiple
times on a sequence of possibly dependent headers. Later headers
may depend on earlier headers to provide declarations. They cannot
be safely included independently on some platforms.

For example, many POSIX APIs document including sys/types.h before some
other headers. Also on some OS X versions sys/socket.h must be included
before net/if.h or the check for the latter will fail.

Signed-off-by: Brad King <brad.king@kitware.com>

show more ...


12