1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
Files
libssh2/src
Viktor Szakats a8e4456b05 cmake: avoid passing options via CMAKE_*_FLAGS
- replace `CMAKE_C_FLAGS*` and `CMAKE_CXX_FLAGS` with `COMPILE_OPTIONS`.
- replace `CMAKE_SHARED_LINKER_FLAGS_DEBUG` with
  `LINK_OPTIONS`/`LINK_FLAGS`.
- make it explicit to pass these C flags to feature checks.
- enable `-pedantic-errors` picky option for GCC with CMake <3.23.
- drop redundant condition when stripping existing MSVC `/Wn` options.

CMake passes `CMAKE_C_FLAGS` to targets, feature checks and raw
`try_compile()` calls. With `COMPILE_OPTIONS`, this is limited to
targets, and we must explicitly pass them to feature checks. This
makes the build logic clearer, and offers more control. It also
reduces log noise by omitting these options from linker commands,
and from `CMAKE_C_FLAGS` dumps in feature checks.

Closes #1575
2025-04-15 01:47:31 +02:00
..
2025-01-31 02:00:28 +01:00
2023-06-07 08:18:55 +02:00
2025-03-11 01:38:17 +01:00
2023-06-07 08:18:55 +02:00
2023-12-02 09:53:56 +00:00
2023-08-18 11:20:58 +00:00
2024-04-26 22:58:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00