1
0
Fork 0
mirror of synced 2024-11-14 13:08:59 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/cmake.snippets

59 lines
829 B
Text
Raw Normal View History

2012-08-16 23:41:25 -04:00
snippet cmake
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(${1:ProjectName})
FIND_PACKAGE(${2:LIBRARY})
INCLUDE_DIRECTORIES(
${$2_INCLUDE_DIR}
)
ADD_SUBDIRECTORY(${0:src})
2012-08-16 23:41:25 -04:00
ADD_EXECUTABLE($1)
TARGET_LINK_LIBRARIES($1
${$2_LIBRARIES}
)
snippet include
INCLUDE_DIRECTORIES(
${${0:INCLUDE_DIR}}
2012-08-16 23:41:25 -04:00
)
snippet find
FIND_PACKAGE(${0:LIBRARY})
2012-08-16 23:41:25 -04:00
snippet glob
FILE(GLOB ${1:SRCS} *.${0:cpp})
2012-08-16 23:41:25 -04:00
snippet subdir
ADD_SUBDIRECTORY(${0:src})
2012-08-16 23:41:25 -04:00
snippet lib
ADD_LIBRARY(${1:lib} ${2:STATIC}
${${0:SRCS}}
2012-08-16 23:41:25 -04:00
)
snippet link
TARGET_LINK_LIBRARIES(${1:bin}
${0:somelib}
2012-08-16 23:41:25 -04:00
)
2013-07-17 19:06:05 -04:00
2012-08-16 23:41:25 -04:00
snippet bin
ADD_EXECUTABLE(${1:bin})
snippet set
SET(${1:var} ${0:val})
2012-08-16 23:41:25 -04:00
snippet dep
ADD_DEPENDENCIES(${1:target}
${0:dep}
2012-08-16 23:41:25 -04:00
)
snippet props
2013-07-17 19:06:05 -04:00
SET_TARGET_PROPERTIES(${1:target}
${2:PROPERTIES} ${3:COMPILE_FLAGS}
${0:"-O3 -Wall -pedantic"}
2012-08-16 23:41:25 -04:00
)