/usr/share/vim/addons/snippets/cmake.snippets is in vim-snippets 1.0.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | snippet cmake
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(${1:ProjectName})
FIND_PACKAGE(${2:LIBRARY})
INCLUDE_DIRECTORIES(
${$2_INCLUDE_DIR}
)
ADD_SUBDIRECTORY(${0:src})
ADD_EXECUTABLE($1)
TARGET_LINK_LIBRARIES($1
${$2_LIBRARIES}
)
snippet include
INCLUDE_DIRECTORIES(
${${0:INCLUDE_DIR}}
)
snippet find
FIND_PACKAGE(${0:LIBRARY})
snippet glob
FILE(GLOB ${1:SRCS} *.${0:cpp})
snippet subdir
ADD_SUBDIRECTORY(${0:src})
snippet lib
ADD_LIBRARY(${1:lib} ${2:STATIC}
${${0:SRCS}}
)
snippet link
TARGET_LINK_LIBRARIES(${1:bin}
${0:somelib}
)
snippet bin
ADD_EXECUTABLE(${1:bin})
snippet set
SET(${1:var} ${0:val})
snippet dep
ADD_DEPENDENCIES(${1:target}
${0:dep}
)
snippet props
SET_TARGET_PROPERTIES(${1:target}
${2:PROPERTIES} ${3:COMPILE_FLAGS}
${0:"-O3 -Wall -pedantic"}
)
|