Skip to content

Commit

Permalink
Merge pull request #68 from Microsoft/dev/jgoshi/FICMake3_13
Browse files Browse the repository at this point in the history
FI upstream cmake 3.13
  • Loading branch information
jgoshi committed Nov 24, 2018
2 parents 529d87d + 3dedd4d commit 2d21004
Show file tree
Hide file tree
Showing 1,537 changed files with 37,832 additions and 19,171 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ Testing

# Visual Studio work directory
.vs/

# Visual Studio Code
.vscode/
2 changes: 1 addition & 1 deletion Auxiliary/cmake-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ set the path with these commands:
(* (or (not (any space "()#\\\n")) (and ?\\ nonl)))))
(defconst cmake-regex-token
(rx-to-string `(group (or (regexp ,cmake-regex-comment)
?( ?)
?\( ?\)
(regexp ,cmake-regex-argument-unquoted)
(regexp ,cmake-regex-argument-quoted)))))
(defconst cmake-regex-indented
Expand Down
35 changes: 31 additions & 4 deletions Auxiliary/vim/cmake.vim.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ endif
let s:keepcpo= &cpo
set cpo&vim

syn region cmakeComment start="#" end="$" contains=cmakeTodo,cmakeLuaComment,@Spell
syn region cmakeLuaComment start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
syn region cmakeBracketArgument start="\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell

syn region cmakeComment start="#" end="$" contains=cmakeTodo,@Spell
syn region cmakeBracketComment start="#\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell

syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
Expand All @@ -33,7 +35,7 @@ syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmak

syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo

syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeArguments,cmakeTodo
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo

syn case match

Expand Down Expand Up @@ -75,6 +77,8 @@ syn keyword cmakeTodo
\ TODO FIXME XXX
\ contained

hi def link cmakeBracketArgument String
hi def link cmakeBracketComment Comment
hi def link cmakeCommand Function
hi def link cmakeCommandConditional Conditional
hi def link cmakeCommandDeprecated WarningMsg
Expand All @@ -84,7 +88,6 @@ hi def link cmakeEnvironment Special
hi def link cmakeEscaped Special
hi def link cmakeGeneratorExpression WarningMsg
hi def link cmakeGeneratorExpressions Constant
hi def link cmakeLuaComment Comment
hi def link cmakeModule Include
hi def link cmakeProperty Constant
hi def link cmakeRegistry Underlined
Expand All @@ -95,6 +98,30 @@ hi def link cmakeVariable Identifier

@KEYWORDS_HIGHLIGHT@

" Manually added - difficult to parse out of documentation
syn case ignore

syn keyword cmakeCommandManuallyAdded
\ configure_package_config_file write_basic_package_version_file
\ nextgroup=cmakeArguments

syn case match

syn keyword cmakeKWconfigure_package_config_file contained
\ INSTALL_DESTINATION PATH_VARS NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO INSTALL_PREFIX

syn keyword cmakeKWconfigure_package_config_file_constants contained
\ AnyNewerVersion SameMajorVersion SameMinorVersion ExactVersion

syn keyword cmakeKWwrite_basic_package_version_file contained
\ VERSION COMPATIBILITY

hi def link cmakeCommandManuallyAdded Function

hi def link cmakeKWconfigure_package_config_file ModeMsg
hi def link cmakeKWwrite_basic_package_version_file ModeMsg
hi def link cmakeKWconfigure_package_config_file_constants Constant

let b:current_syntax = "cmake"

let &cpo = s:keepcpo
Expand Down
25 changes: 16 additions & 9 deletions Auxiliary/vim/extract-upper-case.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@
my @tmp = grep { ! exists $conditional{$_} and
! exists $loop{$_} and
! exists $deprecated{$_} } @commands;
print OUT " " x 12 , "\\ ", join(" ", @tmp), "\n";
print_list(\*OUT, @tmp);
} elsif ($1 eq "VARIABLE_LIST") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %variables), "\n";
print_list(\*OUT, keys %variables);
} elsif ($1 eq "MODULES") {
print OUT " " x 12 , "\\ ", join("\n", @modules), "\n";
print_list(\*OUT, @modules);
} elsif ($1 eq "GENERATOR_EXPRESSIONS") {
print OUT " " x 12 , "\\ ", join(" ", @generator_expr), "\n";
print_list(\*OUT, @generator_expr);
} elsif ($1 eq "CONDITIONALS") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %conditional), "\n";
print_list(\*OUT, keys %conditional);
} elsif ($1 eq "LOOPS") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %loop), "\n";
print_list(\*OUT, keys %loop);
} elsif ($1 eq "DEPRECATED") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %deprecated), "\n";
print_list(\*OUT, keys %deprecated);
} elsif ($1 eq "PROPERTIES") {
print OUT " " x 12 , "\\ ", join(" ", sort keys %properties), "\n";
print_list(\*OUT, keys %properties);
} elsif ($1 eq "KEYWORDS") {
foreach my $k (sort keys %keywords) {
print OUT "syn keyword cmakeKW$k contained\n";
print OUT " " x 12, "\\ ", join(" ", @{$keywords{$k}}), "\n";
print_list(\*OUT, @{$keywords{$k}});
print OUT "\n";
push @keyword_hi, "hi def link cmakeKW$k ModeMsg";
}
Expand Down Expand Up @@ -164,3 +164,10 @@ sub extract_upper

return @word;
}

sub print_list
{
my $O = shift;
my $indent = " " x 12 . "\\ ";
print $O $indent, join("\n" . $indent, sort @_), "\n";
}
Loading

0 comments on commit 2d21004

Please sign in to comment.