Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Add a warning on UseOpenSSL script to avoid unwanted OpenSSL installation to be found #92

Open
lulivi opened this issue Mar 16, 2023 · 0 comments
Labels
enhancement New feature or request unconfirmed The issue is not yet confirmed

Comments

@lulivi
Copy link
Collaborator

lulivi commented Mar 16, 2023

System information

  • Affected script: cmake/Modules/UseOpenSSL.cmake
  • Affected repository:
  • Operating system:
  • Compiler:
  • Compiler version:
  • Additional information:

What is the current behavior?

When building a Connext example inside the rticonnextdds-examples repository, if the UseOpenSSL.cmake script is included before searching for the security plugins (and therefore for OpenSSL) in the FindRTIConnextDDS.cmake script, there is a special case that can happen:

  • The CONNEXTDDS_OPENSSL_DIR CMake variable is set, and the OPENSSL_ROOT_DIR CMake variable is empty.
    This can happen and will yield to unexpected results, since the CONNEXTDDS_OPENSSL_DIR variable is not used in the UseOpenSSL script.

To avoid this, we can add a simple check:

if(DEFINED CONNEXTDDS_OPENSSL_DIR AND NOT DEFINED OPENSSL_ROOT_DIR)
    message(WARNING "Ensure you are searching for the security_plugins component of the FindRTIConnextDDS script when using the `CONNEXTDDS_OPENSSL_DIR` variable")
    set(OPENSSL_ROOT_DIR "${CONNEXTDDS_OPENSSL_DIR}")
endif()

Steps to reproduce the issue

Expected behavior

Suggested solutions

@lulivi lulivi added bug Something isn't working unconfirmed The issue is not yet confirmed enhancement New feature or request and removed bug Something isn't working labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed The issue is not yet confirmed
Projects
None yet
Development

No branches or pull requests

1 participant