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

Be careful comparing CMake strings to empty, in Findsodium #101

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

zanebeckwith
Copy link
Collaborator

Findsodium uses the following to see if the user has specified the name of the sodium libraries (I don't know why it allows that, but it does):
if (sodium_LIBRARIES STREQUAL "")
If this is true, then it sets it to the reasonable default sodium.

The problem is that if sodium_LIBRARIES is not even set, then this is untrue, so sodium_LIBRARIES never gets set, and we call find_library on an unset variable (and thus never find that library).

This fixes that by explicitly augmenting that check to
if (NOT DEFINED sodium_LIBRARIES OR sodium_LIBRARIES STREQUAL "")

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.127% when pulling ab97f1a on zanebeckwith:sodium-cmake-str-comp into 8d30167 on xaptum:master.

@zanebeckwith zanebeckwith merged commit 92d24f9 into xaptum:master Apr 11, 2018
@zanebeckwith zanebeckwith deleted the sodium-cmake-str-comp branch April 11, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants