1 ## CMake syntax highlighter for GNU Nano
3 syntax "CMake" "(CMakeLists\.txt|\.cmake)$"
6 icolor green "^[[:space:]]*[A-Z0-9_]+"
7 icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
9 icolor brightgreen "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
10 color brightgreen "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]"
11 color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]"
13 icolor brightred "^[[:space:]]*\<((end)?(function|macro)|return)"
16 color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
17 color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
19 icolor brightred start="\$(\{|ENV\{)" end="\}"
20 color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
22 icolor brightblue "^([[:space:]]*)?#.*"
23 icolor brightblue "[[:space:]]#.*"
25 ## Trailing whitespace
26 color ,green "[[:space:]]+$"