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

Added package configs and fixed hiredis_ssl on Windows #770

Closed
wants to merge 5 commits into from

Conversation

heronr
Copy link
Contributor

@heronr heronr commented Mar 2, 2020

This change mainly accomplishes 2 things:

  1. A CMake build now generates package config files for both hiredis and hiredis_ssl. This enables other CMake projects to use find_package() calls to more easily incorporate hiredis into their project.

  2. hiredis_ssl now builds on Windows using the CMake project

I was able to successfully build on both Windows and Linux using these changes.

@heronr heronr force-pushed the cmake_config_and_win_ssl branch from 2aa58fc to 1360b0d Compare March 2, 2020 00:32
@heronr
Copy link
Contributor Author

heronr commented Mar 6, 2020

This should hopefully not be a controversial change. Nevertheless, is it preferred that I actually split this into 2 PRs since it combines 2 unrelated changes?

@heronr heronr force-pushed the cmake_config_and_win_ssl branch from 1360b0d to 0a551ff Compare March 24, 2020 05:12
@heronr
Copy link
Contributor Author

heronr commented Mar 24, 2020

@michael-grunder Does this seem reasonable? Should I create an issue to correspond with this change?

@michael-grunder michael-grunder added this to the 1.0.0 milestone Mar 25, 2020
@michael-grunder
Copy link
Collaborator

michael-grunder commented Mar 25, 2020

It does seem reasonable to me but I am not overly familiar with CMake so I would defer to @mnunberg in that respect and @yossigo for the SSL changes (since he wrote the SSL layer).

@yossigo
Copy link
Member

yossigo commented Apr 7, 2020

Hi @heronr, not a CMake expert but it looks perfectly reasonable to me. Same for the SSL locking changes, thanks!

@michael-grunder
Copy link
Collaborator

Thanks for another set of eyes @yossigo!

@heronr I'll fix the conflicts since I broke it with another commit and get this merged before we release 1.0.0.

@yossigo
Copy link
Member

yossigo commented Apr 7, 2020

@heronr Looking at another CMake related issue now and I noticed this:

SET_TARGET_PROPERTIES(hiredis
    PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE
    VERSION "${HIREDIS_SONAME}")

Doesn't this make the explicit def files redundant, or the other way around - if explicit export is used perhaps we can avoid WINDOWS_EXPORT_ALL_SYMBOLS?

@michael-grunder
Copy link
Collaborator

I added the WINDOWS_EXPORT_ALL_SYMBOLS and removed the .def file in cc9d032.

My motivation was getting our unit tests working in Windows, including the various different ways one might do that (e.g. build with MSVC, MinGW, or Cygwin) as they needed slightly different exports.

I'm happy to fix the conflicts so we can get this merged.

@yossigo
Copy link
Member

yossigo commented Apr 7, 2020

@michael-grunder Oh okay, haven't really looked around but bumped into this while pushing #780. Thanks!

@michael-grunder
Copy link
Collaborator

Hi @heronr I fixed the merge conflicts on your PR in this branch on my fork

The only substantive change I made was using to WINDOWS_EXPORT_ALL_SYMBOLS instead of .def files. That said, I'm quite unfamiliar with the Windows ecosystem so please let me know if there is a reason we shouldn't do that.

If the changes look good to you I'm happy to merge it into master or if you prefer you could merge my modifications into your PR branch and I'll merge this PR.

Thanks for your contribution!

Cheers,
Mike

@heronr
Copy link
Contributor Author

heronr commented Apr 9, 2020

@michael-grunder , the changes you made look good to me. You can go ahead and merge those changes in. Thank you!

@michael-grunder
Copy link
Collaborator

michael-grunder commented Apr 9, 2020

Closing in favor of #783

Edit: These changes have now been merged, thanks again!

@heronr heronr deleted the cmake_config_and_win_ssl branch April 10, 2020 06:11
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.

4 participants