-
Notifications
You must be signed in to change notification settings - Fork 473
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
Use FetchContent instead of ExternalProject and git submodules in CMake #564
Conversation
After this PR, the cmake build process will not depend on any files in the |
Thanks @PragmaTwice. I think we can do that first if it's too complex. |
Signed-off-by: tison <wander4096@gmail.com>
@PragmaTwice please fix CI failure and ping me when this PR ready. I'll do a manual test on macos env. |
@git-hulk it seems that @PragmaTwice it seems |
OK, I had a glance at the failure test case. The root cause should be that case depends on |
…-kvrocks into cmake-fetchcontent
@PragmaTwice Last failure caused by didn't link |
Sorry, fixed. I didn't encounter this problem when I tested the build locally, probably due to some differences between CI and my local environment. |
@tisonkun CI has been fixed now. |
@PragmaTwice so, how can I build kvrocks with cmake now? You may add a section on README also. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Also manually test on macosx.
Tests failure looks unrelated with this change.
We can later remove submodules and improve build efficiency.
I am not familiar with this topic, but it seems a better way. BTW, i ever wanted to remove Makefile, only keep cmake, since we need to install some libs firstly if we use make. |
Yes, especially on centos, but I'm agree to remove the Makefile since it will cause much extra |
@git-hulk @ShooterIT as stated in #564 (comment), we may proceed this patch to introduce a cc @PragmaTwice do I get it right? |
Overall looks good, will take a new pass again and have a try on my side tonight. |
Yeah, I also think it would be good to remove makefiles after this PR.
You can easily get cmake binaries from https://github.com/Kitware/CMake/releases (I do not try it in an old distro environment like centos or debian stable, but I do know some glibc linking issue will appear while the glibc version in build environment is higher than it in user's environment). I think the most compatible way to use cmake is to build it by your own (as in |
I can lower the required cmake version to 3.11 (if it is confirmed that this version contains all the features used), if that helps with compatibility. |
OK, thanks
If cmake version 3.11 can work well, i vote 3.11 |
@ShooterIT for choosing a newer version, @PragmaTwice explain in this #564 (comment). |
CMake 3.16.0 is released at Nov 26, 2019 no much difference 😂 |
I just tested the build process in cmake 3.11, and an error occurred because a feature here in cmake 3.13 is used.
And cmake 3.13 works well. I will change the required cmake version from 3.16 to 3.13. |
@PragmaTwice Cool, Looks good to me. Also tested on my side on MacOSX and Debian. |
@ShooterIT The required cmake version has been updated to 3.13. (refer to #564 (comment)) |
Co-authored-by: hulk <hulk.website@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May @git-hulk or @ShooterIT take the honor of merging this patch :)
OK, many thanks for @tisonkun help, I'm very glad to merge and summary. |
Thanks @PragmaTwice great work again. |
Check #562 and #561 for more details.
@tisonkun