[Cmake-commits] CMake branch, next, updated. v3.2.2-2040-g261da8a

Brad King brad.king at kitware.com
Wed Apr 22 09:42:27 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  261da8a2e3faee3822ae5600f30c5c9c0011505c (commit)
       via  2ecf168f19096e63c43f3c524d1e43218446e3c3 (commit)
      from  a7898175169b164db4ce85a5337f6b7de5ad6242 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=261da8a2e3faee3822ae5600f30c5c9c0011505c
commit 261da8a2e3faee3822ae5600f30c5c9c0011505c
Merge: a789817 2ecf168
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Apr 22 09:42:26 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 22 09:42:26 2015 -0400

    Merge topic 'bash-completion-updates' into next
    
    2ecf168f bash-completion: Avoid using _init_completion when not defined


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ecf168f19096e63c43f3c524d1e43218446e3c3
commit 2ecf168f19096e63c43f3c524d1e43218446e3c3
Author:     Gaëtan Lehmann <gaetan.lehmann at gmail.com>
AuthorDate: Wed Apr 22 14:15:02 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Apr 22 09:40:17 2015 -0400

    bash-completion: Avoid using _init_completion when not defined
    
    With the current version of homebrew one gets:
    
       bash: _init_completion: command not found
    
    Avoid this by initializing manually when the function is not defined.

diff --git a/Auxiliary/bash-completion/cmake b/Auxiliary/bash-completion/cmake
index 59e0298..557f243 100644
--- a/Auxiliary/bash-completion/cmake
+++ b/Auxiliary/bash-completion/cmake
@@ -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=
diff --git a/Auxiliary/bash-completion/cpack b/Auxiliary/bash-completion/cpack
index 9ab6048..05e0e93 100644
--- a/Auxiliary/bash-completion/cpack
+++ b/Auxiliary/bash-completion/cpack
@@ -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)
diff --git a/Auxiliary/bash-completion/ctest b/Auxiliary/bash-completion/ctest
index 327e12c..387672a 100644
--- a/Auxiliary/bash-completion/ctest
+++ b/Auxiliary/bash-completion/ctest
@@ -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)

-----------------------------------------------------------------------

Summary of changes:
 Auxiliary/bash-completion/cmake |    9 ++++++++-
 Auxiliary/bash-completion/cpack |    9 ++++++++-
 Auxiliary/bash-completion/ctest |    9 ++++++++-
 3 files changed, 24 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list