Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,106
    • Issues 4,106
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !1929

FindOpenSSL: Add component support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Harry Mallon requested to merge hjmallon/cmake:master into master Apr 04, 2018
  • Overview 20
  • Commits 1
  • Pipelines 9
  • Changes 1

I had a problem a long time ago that OPENSSL_LIBRARIES includes the OPENSSL_SSL_LIBRARY but OPENSSL_FOUND does not check for it. On my Windows CI machine this condition is hit and cmake failures occur.

I made merge request !371 (merged) which was in 3.8.0. However this was reversed in 3.8.2 due to #16882 (closed), which I didn't notice until I tried to remove our local hacky fix this week.

Maybe this Pull Req would be a more suitable fix for the long term. The behaviour is intended to be:

  • OPENSSL_FOUND set if OPENSSL_CRYPTO_LIBRARY is found (old behaviour). This behaviour is now documented.
  • COMPONENTS can be sent in find_package. These are SSL and Crypto to match the existing targets. If you send COMPONENTS then OPENSSL_FOUND will only be TRUE if all are available. This is new behaviour.
  • OpenSSL::SSL and/or OpenSSL::Crypto imported targets will only be created if OPENSSL_FOUND is TRUE (existing behavior maintained).
  • OPENSSL_VERSION is sent to find_package_handle_standard_args without checking it exists as the function does that for us I believe. This is a change in behaviour, but should be backwards compatible.

Topic-rename: FindOpenSSL-components

Edited Apr 17, 2018 by Craig Scott
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: master