mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-12 20:39:49 -05:00
Merge topic 'FindMatlab-version-quoting'
a245f850 FindMatlab: Fix extraction of quoted version number
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1316
This commit is contained in:
@@ -681,12 +681,12 @@ function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_ve
|
||||
|
||||
string(SUBSTRING ${_matlab_version_from_cmd} ${index} -1 substring_ans)
|
||||
string(
|
||||
REGEX MATCHALL "ans[\r\n\t ]*=[\r\n\t ]*([0-9]+(\\.[0-9]+)?)"
|
||||
REGEX MATCHALL "ans[\r\n\t ]*=[\r\n\t ]*'?([0-9]+(\\.[0-9]+)?)"
|
||||
matlab_versions_regex
|
||||
${substring_ans})
|
||||
foreach(match IN LISTS matlab_versions_regex)
|
||||
string(
|
||||
REGEX MATCH "ans[\r\n\t ]*=[\r\n\t ]*(([0-9]+)(\\.([0-9]+))?)"
|
||||
REGEX MATCH "ans[\r\n\t ]*=[\r\n\t ]*'?(([0-9]+)(\\.([0-9]+))?)"
|
||||
current_match ${match})
|
||||
|
||||
list(APPEND matlab_list_of_all_versions_tmp ${CMAKE_MATCH_1})
|
||||
|
||||
Reference in New Issue
Block a user