]> git.rmz.io Git - dotfiles.git/commitdiff
vim/snippets: add cmake FetchContent snippets
authorSamir Benmendil <me@rmz.io>
Fri, 11 Mar 2022 08:38:00 +0000 (08:38 +0000)
committerSamir Benmendil <me@rmz.io>
Fri, 11 Mar 2022 08:38:00 +0000 (08:38 +0000)
vim/ultisnips/cmake.snippets

index 44fe3e0f99215eba73f0db329617d45453a3e127..318bf56b01e4426fcaaa8e1c65a8422b7b1628ec 100644 (file)
@@ -105,3 +105,17 @@ snippet FPP "FPP Copyright" b
 # permission of Focal Point Positioning Limited.
 ${0}
 endsnippet
 # 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