Skip to content

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jul 14, 2023

  • dedupe Requires.private in libssh2.pc.
    zlib could appear on the list twice:

    Requires.private: libssl,libcrypto,zlib,zlib
    

    According to CMake docs list(REMOVE_DUPLICATES ...), is supported by our minimum required CMake version (and by earlier ones even): https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates

  • move cmake_minimum_required() to the top.

  • move set(CMAKE_MODULE_PATH) to the top.

  • delete duplicate set(CMAKE_MODULE_PATH).

  • replace CMAKE_CURRENT_SOURCE_DIR with
    PROJECT_SOURCE_DIR in root CMakeLists.txt
    for robustness.

  • replace gcovr option with long-form for readability/consistency.

  • rename GCOV_OPTIONS to GCOV_CFLAGS.

Closes #1122

@vszakats vszakats added the build label Jul 14, 2023
For example, `zlib` could appear on the list twice:
```
Requires.private: libssl,libcrypto,zlib,zlib
```

This patch fixes this to:
```
Requires.private: libssl,libcrypto,zlib
```

According to CMake docs `list(REMOVE_DUPLICATES ...)`, is supported by
our minimum required CMake version (and by earlier ones even):
https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates

Closes libssh2#1122
@vszakats vszakats force-pushed the cmake-pc-dedupe-required-private branch from 2a13020 to 7bb8da9 Compare July 14, 2023 09:21
@vszakats vszakats changed the title cmake: dedupe Requires.private in libssh2.pc cmake: tidy-ups Jul 14, 2023
@vszakats vszakats force-pushed the cmake-pc-dedupe-required-private branch from d55563b to 52de0a3 Compare July 14, 2023 09:52
@vszakats vszakats closed this in 2fc3679 Jul 14, 2023
@vszakats vszakats deleted the cmake-pc-dedupe-required-private branch July 14, 2023 12:36
lampmanyao pushed a commit to lampmanyao/libssh2 that referenced this pull request Sep 3, 2023
- dedupe `Requires.private` in `libssh2.pc`.
  `zlib` could appear on the list twice:
  ```
  Requires.private: libssl,libcrypto,zlib,zlib
  ```
  According to CMake docs `list(REMOVE_DUPLICATES ...)`, is supported by
  our minimum required CMake version (and by   earlier ones even):
  https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates

- move `cmake_minimum_required()` to the top.

- move `set(CMAKE_MODULE_PATH)` to the top.

- delete duplicate `set(CMAKE_MODULE_PATH)`.

- replace `CMAKE_CURRENT_SOURCE_DIR` with `PROJECT_SOURCE_DIR` in root
  `CMakeLists.txt` for robustness.

- replace `gcovr` option with long-form for readability/consistency.

- rename `GCOV_OPTIONS` to `GCOV_CFLAGS`. These are C options we enable
  when using gcov, not gcov tooling options.

Closes libssh2#1122
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
- dedupe `Requires.private` in `libssh2.pc`.
  `zlib` could appear on the list twice:
  ```
  Requires.private: libssl,libcrypto,zlib,zlib
  ```
  According to CMake docs `list(REMOVE_DUPLICATES ...)`, is supported by
  our minimum required CMake version (and by   earlier ones even):
  https://cmake.org/cmake/help/v3.1/command/list.html#remove-duplicates

- move `cmake_minimum_required()` to the top.

- move `set(CMAKE_MODULE_PATH)` to the top.

- delete duplicate `set(CMAKE_MODULE_PATH)`.

- replace `CMAKE_CURRENT_SOURCE_DIR` with `PROJECT_SOURCE_DIR` in root
  `CMakeLists.txt` for robustness.

- replace `gcovr` option with long-form for readability/consistency.

- rename `GCOV_OPTIONS` to `GCOV_CFLAGS`. These are C options we enable
  when using gcov, not gcov tooling options.

Closes libssh2#1122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant