Cristian Le
Cristian Le
> Concerning the Style it seems there is a clash with my Clion and the cmake-format file in the repo. The file gets regenerated with the wrong formatting. Maybe a...
lgtm Here's a snippet you can run: ```cmake cmake_minimum_required(VERSION 3.24) project(TestCPMFetchContent) include(FetchContent) FetchContent_Declare(CPM GIT_REPOSITORY https://github.com/flagarde/CPM.cmake GIT_TAG FetchContent OVERRIDE_FIND_PACKAGE) find_package(CPM) ```
Hmm my tests on this do not succeed yet. I've added a `message(WARNING)` inside `CPMConfig.cmake.in` and it did not print out
Of course, but that's the intended behaviour :smile: The warning I get there is: ``` CMake Warning at cmake-build-debug/_deps/cpm-src/cmake/CPM.cmake:80 (message): CPM: Your project is using an unstable development version of...
> ```cmake > cmake_minimum_required(VERSION 3.24) > project(TestCPMFetchContent) > > include(FetchContent) > FetchContent_Declare(CPM > GIT_REPOSITORY https://github.com/flagarde/CPM.cmake > GIT_TAG FetchContent > ) > > > FetchContent_MakeAvailable(CPM) > find_package(CPM) > # the install...
> maybe a NO_POLICY_SCOPE in include(cmake/CPM.cmake) would be safer as we set some policy I don't know about this. I defer to others on this. > I khow but how...
It's a bit tricky because `find_package(B)` will not propagate `find_package(CPM)` unless it is `OVERRIDE_FIND_PACKAGE`. `C` is the top level so it should be deciding if it wants a specific version...
Found what we were looking for: https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_PACKAGE_REDIRECTS_DIR.html#variable:CMAKE_FIND_PACKAGE_REDIRECTS_DIR
Yes 👍 from me. These stuff are just QOL improvements we can do later. You still need a proper reviewer to accept and cmake-format it.
> Could we not simply add a zipped directory containing `CPM` inside a `CMakeLists.txt` to the releases and pointing `FetchContent` to that URL to support it? This would needlessly overcomplicate...