From 5080c6843b61a148e7d7c0ff5fad5c02225892ea Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 11 Mar 2022 08:38:00 +0000 Subject: [PATCH] vim/snippets: add cmake FetchContent snippets --- vim/ultisnips/cmake.snippets | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.48.1