diff options
author | Brad King <brad.king@kitware.com> | 2017-09-29 12:54:19 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-09-29 12:54:22 (GMT) |
commit | 41492c2d99b0e2c9bdc166af3b6eea8e3da95aa6 (patch) | |
tree | b3b6fbd5f3ed246ce2b7e785f0d9420a7a1b1ae3 /Modules | |
parent | 194dd9ea8b6fb8b73aa6484551e87bb7676015cc (diff) | |
parent | a245f850bc4f4f209e759b6eab5b48c0693e38af (diff) | |
download | CMake-41492c2d99b0e2c9bdc166af3b6eea8e3da95aa6.zip CMake-41492c2d99b0e2c9bdc166af3b6eea8e3da95aa6.tar.gz CMake-41492c2d99b0e2c9bdc166af3b6eea8e3da95aa6.tar.bz2 |
Merge topic 'FindMatlab-version-quoting'
a245f850 FindMatlab: Fix extraction of quoted version number
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1316
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMatlab.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 7493281..d287688 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -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}) |