vim-cmake-syntax 2019-05-29 (c42ede9f)
Code extracted from: https://github.com/pboettch/vim-cmake-syntax.git at commit c42ede9f70e53a69f98e5bc5df16f834937dd37c (master). Upstream Shortlog ----------------- Patrick Boettcher (6): 4e657a05 update to cmake version 3.13.20181220-g0495c b0ada6e2 add <LANG>-replacing in variables. 60654a65 Update keywords for version 3.14.20190402-g56ae2 33e512bd format brace-encapsulated variables (varname from var) a3628ebb fix keywords of generator-expressions wrongly colored in simple arguments c42ede9f update to cmake version 3.14.20190529-g067a4f
This commit is contained in:
parent
c9493939ea
commit
06434fc274
@ -31,11 +31,11 @@ syn region cmakeGeneratorExpression start="$<" end=">" contained oneline contain
|
||||
|
||||
syn region cmakeString start='"' end='"' contained contains=cmakeTodo,cmakeVariableValue,cmakeEscaped
|
||||
|
||||
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo
|
||||
syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmakeVariable,cmakeTodo,cmakeVariableValue
|
||||
|
||||
syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
|
||||
|
||||
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
|
||||
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeGeneratorExpressions,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
|
||||
|
||||
syn case match
|
||||
|
||||
|
@ -13,6 +13,9 @@ my @properties;
|
||||
my @modules;
|
||||
my %keywords; # command => keyword-list
|
||||
|
||||
# find cmake/Modules/ | sed -rn 's/.*CMakeDetermine(.+)Compiler.cmake/\1/p' | sort
|
||||
my @languages = qw(ASM ASM_MASM ASM_NASM C CSharp CUDA CXX Fortran Java RC Swift);
|
||||
|
||||
# unwanted upper-cases
|
||||
my %unwanted = map { $_ => 1 } qw(VS CXX IDE NOTFOUND NO_ DFOO DBAR NEW);
|
||||
# cannot remove ALL - exists for add_custom_command
|
||||
@ -30,8 +33,21 @@ push @modules, "ExternalProject";
|
||||
# variables
|
||||
open(CMAKE, "$cmake --help-variable-list|") or die "could not run cmake";
|
||||
while (<CMAKE>) {
|
||||
next if /\</; # skip if containing < or >
|
||||
chomp;
|
||||
|
||||
if (/<(.*?)>/) {
|
||||
if ($1 eq 'LANG') {
|
||||
foreach my $lang (@languages) {
|
||||
(my $V = $_) =~ s/<.*>/$lang/;
|
||||
push @variables, $V;
|
||||
}
|
||||
|
||||
next
|
||||
} else {
|
||||
next; # skip if containing < or >
|
||||
}
|
||||
}
|
||||
|
||||
push @variables, $_;
|
||||
}
|
||||
close(CMAKE);
|
||||
|
887
syntax/cmake.vim
887
syntax/cmake.vim
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user