Skip to content

Commit 73621c5

Browse files
committed
Check if the matlab release derived from Matlab_ROOT_DIR and
Matlab_ADDITIONAL_VERSIONS match
1 parent 12be6a7 commit 73621c5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

matlab/tools/cmake/BuildMatlabArrowInterface.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ function(set_matlab_variables)
4848
message(STATUS "matlab_release_name = ${matlab_release_name}")
4949
string(SUBSTRING ${MATLAB_ADDITIONAL_VERSIONS} 0 ${matlab_additional_versions_length} matlab_release_version)
5050
message(STATUS "matlab_release_version = ${matlab_release_version}")
51+
get_filename_component(matlab_root_dir_release ${Matlab_ROOT_DIR} NAME)
52+
message(STATUS "matlab_root_dir_release = ${matlab_root_dir_release}")
5153

52-
if (${Matlab_ROOT_DIR} MATCHES "(\\${matlab_release_name}|/${matlab_release_name})$")
53-
message(STATUS "matches!!!")
54-
else()
55-
message(STATUS "does NOT match")
54+
if (NOT ${matlab_root_dir_release} STREQUAL ${matlab_release_name})
55+
message(STATUS "Does not match!!!")
56+
message(FATAL_ERROR "Unknown MATLAB Release");
5657
endif()
5758

5859
endfunction()

0 commit comments

Comments
 (0)