ENH: More system variables, more operators, more commands, fix some string issues and some cmake arguments issues

This commit is contained in:
Andy Cedilnik 2006-04-12 21:20:38 -04:00
parent 8ec0f76e88
commit 5171493586
1 changed files with 15 additions and 9 deletions

View File

@ -17,8 +17,14 @@
" Vim syntax file " Vim syntax file
" Language: CMake " Language: CMake
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com> " Maintainer: Andy Cedilnik <andy.cedilnik@kitware.com>
" Last Change: Fri Mar 21 22:33:55 EST 2003 " Last Change: $Date$
" Version: $Revision$
"
" Licence: This program is free software; you can redistribute it
" and/or modify it under the terms of the CMake
" License. See http://www.cmake.org/HTML/Copyright.html
" For version 5.x: Clear all syntax items " For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded " For version 6.x: Quit when a syntax file was already loaded
@ -28,8 +34,6 @@ elseif exists("b:current_syntax")
finish finish
endif endif
syn case match syn case match
syn match cmakeComment /#.*$/ syn match cmakeComment /#.*$/
syn region cmakeRegistry start=/\[/ end=/\]/ skip=/\\[\[\]]/ syn region cmakeRegistry start=/\[/ end=/\]/ skip=/\\[\[\]]/
@ -40,17 +44,19 @@ syn match cmakeVariableValue /\${[^}]*}/
\ contained oneline \ contained oneline
syn match cmakeEnvironment /\$ENV{.*}/ syn match cmakeEnvironment /\$ENV{.*}/
\ contained \ contained
syn keyword cmakeSystemVariables WIN32 UNIX APPLE syn keyword cmakeSystemVariables
syn keyword cmakeOperators MATCHES AND OR EXISTS CACHE STRING BOOL PROGRAM NAMES INTERNAL PATHS DOC PATH NOT NAME NAME_WE FALSE TRUE ON OFF \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80
syn keyword cmakeOperators
\ AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE
" \ contained " \ contained
syn region cmakeString start=/"/ end=/"/ skip=/\\"/ syn region cmakeString start=/"/ end=/"/ skip=/\\"/
\ contains=cmakeVariableValue,cmakeRegistry keepend oneline \ contains=ALLBUT,cmakeString
syn region cmakeArguments start=/\s*(/ end=/)/ syn region cmakeArguments start=/\s*(/ end=/)/
\ contains=cmakeEnvironment,cmakeRegistry,cmakeVariableValue,cmakeString,cmakeArgument,cmakeOperators keepend \ contains=ALLBUT,cmakeArguments
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 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
\ nextgroup=cmakeArgument \ nextgroup=cmakeArgument
syn keyword cmakeStatement syn keyword cmakeStatement
\ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ENABLE_TESTING FOREACH ENDFOREACH IF ELSE ENDIF EXPORT_LIBRARY_DEPENDENCIES FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI GET_CMAKE_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS ITK_WRAP_TCL LINK_DIRECTORIES LINK_LIBRARIES LOAD_CACHE LOAD_COMMAND MACRO ENDMACRO MAKE_DIRECTORY MARK_AS_ADVANCED MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI SEPARATE_ARGUMENTS REMOVE SET SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIRS SUBDIR_DEPENDS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES WRITE_FILE \ 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 ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDIF ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH 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 USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE
\ nextgroup=cmakeArgumnts \ nextgroup=cmakeArgumnts
syn match cmakeMacro /[A-Z_]+/ nextgroup=cmakeArgumnts syn match cmakeMacro /[A-Z_]+/ nextgroup=cmakeArgumnts
@ -66,7 +72,6 @@ if version >= 508 || !exists("did_cmake_syntax_inits")
command -nargs=+ HiLink hi def link <args> command -nargs=+ HiLink hi def link <args>
endif endif
HiLink cmakeStatement Statement HiLink cmakeStatement Statement
HiLink cmakeComment Comment HiLink cmakeComment Comment
HiLink cmakeString String HiLink cmakeString String
@ -77,6 +82,7 @@ if version >= 508 || !exists("did_cmake_syntax_inits")
HiLink cmakeEnvironment Special HiLink cmakeEnvironment Special
HiLink cmakeOperators Operator HiLink cmakeOperators Operator
HiLink cmakeMacro PreProc HiLink cmakeMacro PreProc
HiLink cmakeError Error
delcommand HiLink delcommand HiLink
endif endif