mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-13 09:49:42 -06:00
FindMatlab: Tolerate empty version log file
This commit is contained in:
committed by
Brad King
parent
6f23321d40
commit
40176749bc
@@ -725,7 +725,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve
|
||||
file(REMOVE "${_matlab_temporary_folder}/matlabVersionLog.cmaketmp")
|
||||
|
||||
set(index -1)
|
||||
string(FIND ${_matlab_version_from_cmd} "ans" index)
|
||||
string(FIND "${_matlab_version_from_cmd}" "ans" index)
|
||||
if(index EQUAL -1)
|
||||
|
||||
if(MATLAB_FIND_DEBUG)
|
||||
@@ -735,7 +735,7 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve
|
||||
else()
|
||||
set(matlab_list_of_all_versions_tmp)
|
||||
|
||||
string(SUBSTRING ${_matlab_version_from_cmd} ${index} -1 substring_ans)
|
||||
string(SUBSTRING "${_matlab_version_from_cmd}" ${index} -1 substring_ans)
|
||||
string(
|
||||
REGEX MATCHALL "ans[\r\n\t ]*=[\r\n\t ]*'?([0-9]+(\\.[0-9]+)?)"
|
||||
matlab_versions_regex
|
||||
|
||||
Reference in New Issue
Block a user