Skip to content

Commit

Permalink
Import version 3.23.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pwdraper committed Jul 29, 2022
1 parent a2a716e commit b3a5605
Show file tree
Hide file tree
Showing 17,894 changed files with 1,013,873 additions and 179,936 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 15 additions & 3 deletions Auxiliary/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${CMAKE_DATA_DIR}/editors/vim)
install(FILES cmake-mode.el DESTINATION ${CMAKE_DATA_DIR}/editors/emacs)
install(FILES cmake.m4 DESTINATION share/aclocal)
# Install Vim files to a typical system integration directory.
# Packagers can set CMake_INSTALL_VIMFILES_DIR to control this.
if(NOT CMake_INSTALL_VIMFILES_DIR)
set(CMake_INSTALL_VIMFILES_DIR ${CMAKE_XDGDATA_DIR}/vim/vimfiles)
endif()
install(DIRECTORY vim/indent vim/syntax DESTINATION ${CMake_INSTALL_VIMFILES_DIR})

# Install Emacs files to a typical system integration directory.
# Packagers can set CMake_INSTALL_EMACS_DIR to control this.
if(NOT CMake_INSTALL_EMACS_DIR)
set(CMake_INSTALL_EMACS_DIR ${CMAKE_XDGDATA_DIR}/emacs/site-lisp)
endif()
install(FILES cmake-mode.el DESTINATION ${CMake_INSTALL_EMACS_DIR})

install(FILES cmake.m4 DESTINATION ${CMAKE_XDGDATA_DIR}/aclocal)
add_subdirectory (bash-completion)
29 changes: 21 additions & 8 deletions Auxiliary/bash-completion/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# Always install completion file in local dir
# in order to be sure to always be able to install
# in a local user directory rooted in a single directory.
# packager should either patch that out or
# add symlinks to the files in appropriate places
# /etc/bash_completion.d/
# DATADIR/completions (may be /usr/share/<package>/completions
install(FILES cmake cpack ctest DESTINATION ${CMAKE_DATA_DIR}/completions)
# We need to integrate into the system install, or this will silently fail to
# accomplish anything at all, and packagers won't even know it exists. Use the
# `<sharedir>/bash-completion/completions/` hierarchy by default, rooted in
# CMake's XDGDATA_DIR definition of the sharedir. This works with installation
# to `/usr` or `/usr/local` (or any prefix which bash-completion is configured
# with) as well as a simple installation by a local user into their home
# directory *if* the prefix is `$HOME/.local` since `.local/share/` is part of
# the bash-completion search path too.
# For more complex installations, packagers can set CMake_INSTALL_BASH_COMP_DIR
# to another system location.

if(NOT CMake_INSTALL_BASH_COMP_DIR)
if(CMAKE_BASH_COMP_DIR)
# Honor previous customization option.
set(CMake_INSTALL_BASH_COMP_DIR "${CMAKE_BASH_COMP_DIR}")
else()
# Default.
set(CMake_INSTALL_BASH_COMP_DIR ${CMAKE_XDGDATA_DIR}/bash-completion/completions)
endif()
endif()
install(FILES cmake cpack ctest DESTINATION ${CMake_INSTALL_BASH_COMP_DIR})
29 changes: 22 additions & 7 deletions Auxiliary/bash-completion/cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
_cmake()
{
local cur prev words cword split=false
_init_completion -n := || return
if type -t _init_completion >/dev/null; then
_init_completion -n = || return
else
# manual initialization for older bash completion versions
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
fi

# Workaround for options like -DCMAKE_BUILD_TYPE=Release
local prefix=
Expand Down Expand Up @@ -69,8 +76,8 @@ _cmake()
compopt -o nospace
else
# complete variable names
COMPREPLY=( $( compgen -W '$( cmake -LA -N | tail -n +2 |
cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
COMPREPLY=( $( compgen -W '$( cmake -LA -N 2>/dev/null |
tail -n +2 | cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
compopt -o nospace
fi
return
Expand All @@ -89,13 +96,13 @@ _cmake()
_filedir
return
;;
--build)
--build|--install|--open)
_filedir -d
return
;;
-E)
COMPREPLY=( $( compgen -W "$( cmake -E help |& sed -n \
'/^ /{s|^ \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \
'/^ [^ ]/{s|^ \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \
-- "$cur" ) )
return
;;
Expand All @@ -109,19 +116,27 @@ _cmake()
2>/dev/null )' -- "$quoted" ) )
return
;;
--loglevel)
COMPREPLY=( $(compgen -W 'error warning notice status verbose debug trace' -- $cur ) )
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null|
grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-manual)
COMPREPLY=( $( compgen -W '$( cmake --help-manual-list 2>/dev/null|
grep -v "^cmake version " | sed -e "s/([0-9])$//" )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null|
grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-policy)
COMPREPLY=( $( compgen -W '$( cmake --help-policies 2>/dev/null |
grep "^ CMP" 2>/dev/null )' -- "$cur" ) )
COMPREPLY=( $( compgen -W '$( cmake --help-policy-list 2>/dev/null |
grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-property)
Expand Down
29 changes: 28 additions & 1 deletion Auxiliary/bash-completion/cpack
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
_cpack()
{
local cur prev words cword
_init_completion -n = || return
if type -t _init_completion >/dev/null; then
_init_completion -n = || return
else
# manual initialization for older bash completion versions
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
fi

case "$prev" in
-G)
Expand Down Expand Up @@ -41,6 +48,26 @@ _cpack()
grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-manual)
COMPREPLY=( $( compgen -W '$( cpack --help-manual-list 2>/dev/null|
grep -v "^cpack version " | sed -e "s/([0-9])$//" )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( cpack --help-module-list 2>/dev/null|
grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-policy)
COMPREPLY=( $( compgen -W '$( cpack --help-policy-list 2>/dev/null |
grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-property)
COMPREPLY=( $( compgen -W '$( cpack --help-property-list \
2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) )
Expand Down
43 changes: 40 additions & 3 deletions Auxiliary/bash-completion/ctest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
_ctest()
{
local cur prev words cword
_init_completion -n = || return
if type -t _init_completion >/dev/null; then
_init_completion -n = || return
else
# manual initialization for older bash completion versions
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
fi

case "$prev" in
-C|--build-config)
Expand All @@ -19,8 +26,12 @@ _ctest()
_filedir
return
;;
-L|--label-regex|-LE|--label-exclude|--track|-I|--tests-information|\
--max-width|--timeout|--stop-time)
-L|--label-regex|-LE|--label-exclude)
COMPREPLY=( $( compgen -W '$( ctest --print-labels 2>/dev/null |
grep "^ " 2>/dev/null | cut -d" " -f 3 )' -- "$cur" ) )
return
;;
--track|-I|--tests-information|--max-width|--timeout|--stop-time)
# argument required but no completions available
return
;;
Expand Down Expand Up @@ -61,11 +72,37 @@ _ctest()
COMPREPLY=( $( compgen -W '0 1' -- "$cur" ) )
return
;;

--help-command)
COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null|
grep -v "^ctest version " )' -- "$cur" ) )
return
;;
--help-manual)
COMPREPLY=( $( compgen -W '$( ctest --help-manual-list 2>/dev/null|
grep -v "^ctest version " | sed -e "s/([0-9])$//" )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( ctest --help-module-list 2>/dev/null|
grep -v "^ctest version " )' -- "$cur" ) )
return
;;
--help-policy)
COMPREPLY=( $( compgen -W '$( ctest --help-policy-list 2>/dev/null |
grep -v "^ctest version " )' -- "$cur" ) )
return
;;
--help-property)
COMPREPLY=( $( compgen -W '$( ctest --help-property-list \
2>/dev/null | grep -v "^ctest version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( ctest --help-variable-list \
2>/dev/null | grep -v "^ctest version " )' -- "$cur" ) )
return
;;
esac

if [[ "$cur" == -* ]]; then
Expand Down
Loading

0 comments on commit b3a5605

Please sign in to comment.