[Cmake-commits] CMake branch, next, updated. v3.6.1-1797-gc5ad71b

Brad King brad.king at kitware.com
Tue Sep 6 08:40:14 EDT 2016


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  c5ad71bf6fb6db3530c060cd1d741c664b8e601a (commit)
       via  29768b03eabcff13b332497caf2fb0e1c1ca717b (commit)
       via  77279153953fb9e757481ac9eb299608f6f2aeba (commit)
      from  d16d98e86a084508666fd9768b779ae0ce96763a (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5ad71bf6fb6db3530c060cd1d741c664b8e601a
commit c5ad71bf6fb6db3530c060cd1d741c664b8e601a
Merge: d16d98e 29768b0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 08:40:13 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 6 08:40:13 2016 -0400

    Merge topic 'FindMatlab-fix-empty-list-index' into next
    
    29768b03 FindMatlab: Avoid indexing an empty list of versions
    77279153 CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29768b03eabcff13b332497caf2fb0e1c1ca717b
commit 29768b03eabcff13b332497caf2fb0e1c1ca717b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 08:39:25 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 6 08:39:38 2016 -0400

    FindMatlab: Avoid indexing an empty list of versions

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 9f96fe6..b501599 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1030,13 +1030,17 @@ function(_Matlab_get_version_from_root matlab_root matlab_known_version matlab_f
   set(matlab_list_of_all_versions)
   matlab_get_version_from_matlab_run("${Matlab_PROG_VERSION_STRING_AUTO_DETECT}" matlab_list_of_all_versions)
 
-  list(GET matlab_list_of_all_versions 0 _matlab_version_tmp)
+  list(LENGTH matlab_list_of_all_versions list_of_all_versions_length)
+  if(${list_of_all_versions_length} GREATER 0)
+    list(GET matlab_list_of_all_versions 0 _matlab_version_tmp)
+  else()
+    set(_matlab_version_tmp "")
+  endif()
 
   # set the version into the cache
   set(Matlab_VERSION_STRING_INTERNAL ${_matlab_version_tmp} CACHE INTERNAL "Matlab version (automatically determined)" FORCE)
 
   # warning, just in case several versions found (should not happen)
-  list(LENGTH matlab_list_of_all_versions list_of_all_versions_length)
   if((${list_of_all_versions_length} GREATER 1) AND MATLAB_FIND_DEBUG)
     message(WARNING "[MATLAB] Found several versions, taking the first one (versions found ${matlab_list_of_all_versions})")
   endif()

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

Summary of changes:
 Modules/FindMatlab.cmake  |    8 ++++++--
 Source/CMakeVersion.cmake |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list