You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very convenient if CPM.cmake supports the cmake --install feature for the generic "find_package() with install prefix" workflow. It will be very convenient for total offline builds (like builds in some Linux distros, or local networks) without actually hardcoding the CPM.cmake inside repo. Furthermore, it also helps distro maintainers to package the libs which already adopted dependency management via CPM.
The potential CMake API would be like (assuming -DCPM_USE_LOCAL_PACKAGES):
One thing to keep in mind is that we prefer projects to hardcode the exact version of CPM.cmake into their CMakeLists, so that we can introduce breaking changes without implicitly breaking dependent projects. This should be possible using more complex project configuration that specifies the version compatibility (for example, see PackageProject.cmake). Another issue is that it would be difficult to use projects using find_package(CPM) as they would first need to install the required version of CPM first in a separate step.
FYI my preferred way to get fully offline builds is to point CPM_SOURCE_CACHE to a directory containing the requested CPM version(s). Together with CPM_USE_LOCAL_PACKAGES it would be a small change from a distributers perspective, but no changes would be needed CMakeLists themselves.
It would be very convenient if CPM.cmake supports the
cmake --install
feature for the generic "find_package()
with install prefix" workflow. It will be very convenient for total offline builds (like builds in some Linux distros, or local networks) without actually hardcoding the CPM.cmake inside repo. Furthermore, it also helps distro maintainers to package the libs which already adopted dependency management via CPM.The potential CMake API would be like (assuming
-DCPM_USE_LOCAL_PACKAGES
):I will make a test PR with
install()
if you won't mind.Thank you for your attention and for your project.
The text was updated successfully, but these errors were encountered: