-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
dfetch import currently generates a manifest by scanning Git submodules and SVN externals only.
Many modern CMake‑based projects manage dependencies via: [dfetch.rea...thedocs.io]
FetchContent_Declare()FetchContent_MakeAvailable()ExternalProject_Add()
It would be extremely helpful if Dfetch could detect these CMake dependency declarations and convert them into dfetch.yaml entries.
Requested Feature
Add optional CMake parsing to dfetch import, for example:
dfetch import --detect-cmake
This should:
- Parse
CMakeLists.txtand included.cmakefiles. - Extract
URL,GIT_REPOSITORY, andGIT_TAGinformation (preferablly all options [externalproject_add](of https://cmake.org/cmake/help/latest/module/ExternalProject.html#command:externalproject_add). - Generate equivalent
projects:entries in the manifest. - Avoid modifying CMake files unless a future flag (
--patch-cmake) is introduced.
Example
From:
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.2
)To:
projects:
- name: json
url: https://github.com/nlohmann/json.git
tag: v3.11.2Why
This allows seamless migration from CMake‑managed dependencies to Dfetch’s unified, VCS‑agnostic vendoring approach.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels