summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTom M <tom.mbrt@googlemail.com>2022-02-13 16:42:32 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-14 15:23:33 (GMT)
commitb8d885ed0d801d02052c65a8482b55587e60fffd (patch)
tree894fd20e3a34de1ee6088db2c48479887241f708 /Modules
parente6e9c8e484e7e0307f948d035c0d87bdee985743 (diff)
downloadCMake-b8d885ed0d801d02052c65a8482b55587e60fffd.zip
CMake-b8d885ed0d801d02052c65a8482b55587e60fffd.tar.gz
CMake-b8d885ed0d801d02052c65a8482b55587e60fffd.tar.bz2
FindMatlab: Fix version detection for MCR >= 9.10
Recent MCR versions have the following `VersionInfo.xml`: <version>9.11.0.1837725</version> Fix parsing of multiple digits in the version components so that we do not mistake this for version `9.1`.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMatlab.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 0ca593e..f0e991b 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1353,7 +1353,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve
${versioninfo_string}
)
- if(CMAKE_MATCH_1 MATCHES "(([0-9])\\.([0-9]))[\\.0-9]*")
+ if(CMAKE_MATCH_1 MATCHES "(([0-9]+)\\.([0-9]+))[\\.0-9]*")
set(_matlab_version_tmp "${CMAKE_MATCH_1}")
endif()
endif()