Merge branch 'upstream-vim-cmake-syntax' into update-vim-syntax
* upstream-vim-cmake-syntax: vim-cmake-syntax 2019-05-29 (c42ede9f)
This commit is contained in:
commit
b410dd5a05
@ -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);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user