2003-07-07 21:36:04 +04:00
|
|
|
" =============================================================================
|
2006-04-16 21:49:25 +04:00
|
|
|
"
|
2003-07-07 21:36:04 +04:00
|
|
|
" Program: CMake - Cross-Platform Makefile Generator
|
|
|
|
" Module: $RCSfile$
|
2006-04-18 18:32:28 +04:00
|
|
|
" Language: VIM
|
2003-07-07 21:36:04 +04:00
|
|
|
" Date: $Date$
|
|
|
|
" Version: $Revision$
|
2006-04-16 21:49:25 +04:00
|
|
|
"
|
2003-07-07 21:36:04 +04:00
|
|
|
" =============================================================================
|
|
|
|
|
|
|
|
" Vim syntax file
|
|
|
|
" Language: CMake
|
2006-04-13 05:20:38 +04:00
|
|
|
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
|
2008-01-16 19:53:53 +03:00
|
|
|
" Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
2006-04-13 05:20:38 +04:00
|
|
|
" Last Change: $Date$
|
|
|
|
" Version: $Revision$
|
2006-04-16 21:49:25 +04:00
|
|
|
"
|
2006-04-18 18:32:28 +04:00
|
|
|
" Licence: The CMake license applies to this file. See
|
|
|
|
" http://www.cmake.org/HTML/Copyright.html
|
|
|
|
" This implies that distribution with Vim is allowed
|
2003-07-07 21:36:04 +04:00
|
|
|
|
|
|
|
" For version 5.x: Clear all syntax items
|
|
|
|
" For version 6.x: Quit when a syntax file was already loaded
|
|
|
|
if version < 600
|
|
|
|
syntax clear
|
|
|
|
elseif exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2006-04-16 21:49:25 +04:00
|
|
|
syn case ignore
|
2008-01-15 03:20:42 +03:00
|
|
|
syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
|
|
|
|
syn region cmakeComment start="#" end="$" contains=cmakeTodo
|
|
|
|
syn region cmakeRegistry start=/\[/ end=/]/
|
|
|
|
\ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped
|
2007-12-18 00:15:26 +03:00
|
|
|
syn region cmakeVariableValue start=/\${/ end=/}/
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contained oneline contains=CONTAINED,cmakeTodo
|
2007-12-18 00:15:26 +03:00
|
|
|
syn region cmakeEnvironment start=/\$ENV{/ end=/}/
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contained oneline contains=CONTAINED,cmakeTodo
|
2012-08-13 21:42:58 +04:00
|
|
|
syn region cmakeString start=/"/ end=/"/
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contains=CONTAINED,cmakeTodo,cmakeOperators
|
2012-08-13 21:42:58 +04:00
|
|
|
syn region cmakeArguments start=/(/ end=/)/
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contains=ALLBUT,cmakeArguments,cmakeTodo
|
2006-04-13 05:20:38 +04:00
|
|
|
syn keyword cmakeSystemVariables
|
2008-08-25 18:31:29 +04:00
|
|
|
\ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90
|
2006-04-13 05:20:38 +04:00
|
|
|
syn keyword cmakeOperators
|
2008-01-16 19:53:53 +03:00
|
|
|
\ ABSOLUTE AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS EXT FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contained
|
2003-07-07 21:36:04 +04:00
|
|
|
syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_REMOVE VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WRAP_EXCLUDE_FILES
|
2008-01-15 03:20:42 +03:00
|
|
|
\ nextgroup=cmakeArguments
|
2008-01-16 19:53:53 +03:00
|
|
|
|
|
|
|
" The keywords are generated as: cmake --help-command-list | tr "\n" " "
|
2012-08-13 21:42:58 +04:00
|
|
|
syn keyword cmakeStatement
|
2008-08-25 18:31:29 +04:00
|
|
|
\ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN UNSET USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE
|
2008-01-15 03:20:42 +03:00
|
|
|
\ nextgroup=cmakeArguments
|
2012-08-13 21:42:58 +04:00
|
|
|
syn keyword cmakeTodo
|
|
|
|
\ TODO FIXME XXX
|
2008-01-15 03:20:42 +03:00
|
|
|
\ contained
|
2003-07-07 21:36:04 +04:00
|
|
|
|
|
|
|
" Define the default highlighting.
|
|
|
|
" For version 5.7 and earlier: only when not done already
|
|
|
|
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
|
|
if version >= 508 || !exists("did_cmake_syntax_inits")
|
|
|
|
if version < 508
|
|
|
|
let did_cmake_syntax_inits = 1
|
|
|
|
command -nargs=+ HiLink hi link <args>
|
|
|
|
else
|
|
|
|
command -nargs=+ HiLink hi def link <args>
|
|
|
|
endif
|
|
|
|
|
|
|
|
HiLink cmakeStatement Statement
|
|
|
|
HiLink cmakeComment Comment
|
|
|
|
HiLink cmakeString String
|
|
|
|
HiLink cmakeVariableValue Type
|
|
|
|
HiLink cmakeRegistry Underlined
|
|
|
|
HiLink cmakeArguments Identifier
|
|
|
|
HiLink cmakeArgument Constant
|
|
|
|
HiLink cmakeEnvironment Special
|
|
|
|
HiLink cmakeOperators Operator
|
|
|
|
HiLink cmakeMacro PreProc
|
2008-01-15 03:20:42 +03:00
|
|
|
HiLink cmakeError Error
|
|
|
|
HiLink cmakeTodo TODO
|
|
|
|
HiLink cmakeEscaped Special
|
2003-07-07 21:36:04 +04:00
|
|
|
|
|
|
|
delcommand HiLink
|
|
|
|
endif
|
|
|
|
|
|
|
|
let b:current_syntax = "cmake"
|
|
|
|
|
|
|
|
"EOF"
|