From: Samir Benmendil Date: Fri, 11 Mar 2022 08:38:00 +0000 (+0000) Subject: vim/snippets: add cmake FetchContent snippets X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/5080c6843b61a148e7d7c0ff5fad5c02225892ea vim/snippets: add cmake FetchContent snippets --- diff --git a/vim/ultisnips/cmake.snippets b/vim/ultisnips/cmake.snippets index 44fe3e0..318bf56 100644 --- a/vim/ultisnips/cmake.snippets +++ b/vim/ultisnips/cmake.snippets @@ -105,3 +105,17 @@ snippet FPP "FPP Copyright" b # permission of Focal Point Positioning Limited. ${0} endsnippet + +snippet FetchContent_url "FetchContent" b +FetchContent_Declare(${1:name} + URL ${2:https://example.com/project.tar.gz} +) +FetchContent_MakeAvailable(${1/\w+/\L$0\E/}) +endsnippet + +snippet FetchContent_git "FetchContent" b +FetchContent_Declare(${1:name} + GIT_REPOSITORY ${2:https://github.com/${3:user/repo}} +) +FetchContent_MakeAvailable(${1/\w+/\L$0\E/}) +endsnippet