Skip to content

Commit eef512f

Browse files
authored
remove CPMFindPackage from the readme (TheLartians#115)
1 parent f6f4e21 commit eef512f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

‎README.md‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,19 +171,17 @@ Instead, create a new directory or project with a CMakeLists that adds the libra
171171
Depending type it might make sense move these components into a separate repositories and reference a specific commit or version of the library.
172172
This has the advantage that individual libraries and components can be improved and updated independently.
173173

174-
> You recommend to add external dependencies using CPM.cmake. Will this force users of my library to use CPM as well?
174+
> You recommend to add external dependencies using CPM.cmake. Will this force users of my library to use CPM.cmake as well?
175175
176176
[CPM.cmake](https://github.com/TheLartians/CPM.cmake) should be invisible to library users as it's a self-contained CMake Script.
177-
If problems do arise, users can always opt-out by defining `CPM_USE_LOCAL_PACKAGES`, which will override all calls to `CPMAddPackage` with `find_package`.
178-
Alternatively, you could use `CPMFindPackage` instead of `CPMAddPackage`, which will try to use `find_package` before calling `CPMAddPackage` as a fallback.
179-
Both approaches should be compatible with common C++ package managers without modifications, however come with the cost of reproducible builds.
177+
If problems do arise, users can always opt-out by defining the CMake or env variable [`CPM_USE_LOCAL_PACKAGES`](https://github.com/cpm-cmake/CPM.cmake#options), which will override all calls to `CPMAddPackage` with the according `find_package` call.
178+
This should also enable users to use the project with their favorite external C++ dependency manager, such as vcpkg or Conan.
180179

181180
> Can I configure and build my project offline?
182181
183-
Using CPM, all missing dependencies are downloaded at configure time.
184-
To avoid redundant downloads, it's recommended to set a CPM cache directory, e.g.: `export CPM_SOURCE_CACHE=$HOME/.cache/CPM`.
185-
This will also allow offline configurations if all dependencies are present.
186-
No internet connection is required for building.
182+
No internet connection is required for building the project, however when using CPM missing dependencies are downloaded at configure time.
183+
To avoid redundant downloads, it's highly recommended to set a CPM.cmake cache directory, e.g.: `export CPM_SOURCE_CACHE=$HOME/.cache/CPM`.
184+
This will enable shallow clones and allow offline configurations dependencies are already available in the cache.
187185

188186
> Can I use CPack to create a package installer for my project?
189187

0 commit comments

Comments
 (0)