-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
cmake: support sudo make uninstall #1674
Conversation
@jasjuang, thanks for your PR! By analyzing the history of the files in this pull request, we identified @billhoffman, @Sukender and @jzakrzewski to be potential reviewers. |
@bagder this PR just copy-paste from CMake FAQ https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F So depending on your decision. |
@snikulov Not sure why you don't like this idea. This is a common feature for most open source libraries that supports cmake like OpenCV, glm, glfw, glew, pcl, ceres, glog, gflags, tinyxml2 etc. Without this PR, how would you remove the files installed in |
@jasjuang As I already mentioned, I prefer to use CPack to make a package for installation.
as mentioned on the link where you copy it. |
@snikulov Well, |
@jasjuang matter of taste. It's shorter because of increased code size under your control and support. |
In general I think it makes sense to support "make uninstall" as an opposite to "make install", and the autotools build supports it already. This code seems to look for and use a |
@bagder |
@bagder then merge it. As I've already mentioned it's copy-paste from cmake F.A.Q., so I see no issue with it. |
Thanks! |
This features reduces the pain of having to remove the installed libraries and headers in /usr/local/ one by one.
Before this change, after sudo make install
there is no easy ways to remove these files, but with this change we can simply type sudo make uninstall and