From 12be6a7c87f0b9ae27c13caa88e71f5fe1c189c6 Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Wed, 22 Nov 2023 14:44:58 -0500 Subject: [PATCH] Check if root dir ends with the release name --- matlab/tools/cmake/BuildMatlabArrowInterface.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake index 20e4734b7cb23..ddf41a173665e 100644 --- a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake +++ b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake @@ -47,7 +47,14 @@ function(set_matlab_variables) string(SUBSTRING ${MATLAB_ADDITIONAL_VERSIONS} 0 ${equal_char_pos} matlab_release_name) message(STATUS "matlab_release_name = ${matlab_release_name}") string(SUBSTRING ${MATLAB_ADDITIONAL_VERSIONS} 0 ${matlab_additional_versions_length} matlab_release_version) - message(STATUS "matlab_release_version = ${matlab_release_version}") + message(STATUS "matlab_release_version = ${matlab_release_version}") + + if (${Matlab_ROOT_DIR} MATCHES "(\\${matlab_release_name}|/${matlab_release_name})$") + message(STATUS "matches!!!") + else() + message(STATUS "does NOT match") + endif() + endfunction() set(MATLAB_ADDITIONAL_VERSIONS "R2023b=23.2")