Skip to content

Commit

Permalink
Check if the matlab release derived from Matlab_ROOT_DIR and
Browse files Browse the repository at this point in the history
Matlab_ADDITIONAL_VERSIONS match
  • Loading branch information
sgilmore10 committed Nov 22, 2023
1 parent 12be6a7 commit 73621c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions matlab/tools/cmake/BuildMatlabArrowInterface.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ function(set_matlab_variables)
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}")
get_filename_component(matlab_root_dir_release ${Matlab_ROOT_DIR} NAME)
message(STATUS "matlab_root_dir_release = ${matlab_root_dir_release}")

if (${Matlab_ROOT_DIR} MATCHES "(\\${matlab_release_name}|/${matlab_release_name})$")
message(STATUS "matches!!!")
else()
message(STATUS "does NOT match")
if (NOT ${matlab_root_dir_release} STREQUAL ${matlab_release_name})
message(STATUS "Does not match!!!")
message(FATAL_ERROR "Unknown MATLAB Release");
endif()

endfunction()
Expand Down

0 comments on commit 73621c5

Please sign in to comment.