mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
+14
-13
@@ -655,7 +655,7 @@ function(matlab_get_mex_suffix matlab_root mex_suffix)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# the program has been found?
|
# the program has been found?
|
||||||
if((NOT Matlab_MEXEXTENSIONS_PROG) OR (NOT EXISTS ${Matlab_MEXEXTENSIONS_PROG}))
|
if(NOT Matlab_MEXEXTENSIONS_PROG)
|
||||||
if(MATLAB_FIND_DEBUG)
|
if(MATLAB_FIND_DEBUG)
|
||||||
message(WARNING "[MATLAB] Cannot found mexext program. Matlab root is ${matlab_root}")
|
message(WARNING "[MATLAB] Cannot found mexext program. Matlab root is ${matlab_root}")
|
||||||
endif()
|
endif()
|
||||||
@@ -706,7 +706,6 @@ function(matlab_get_mex_suffix matlab_root mex_suffix)
|
|||||||
message(STATUS "[MATLAB] '${Matlab_MEXEXTENSIONS_PROG}' : determined extension '${_matlab_mex_extension}' and error string is '${_matlab_mex_extension_error}'")
|
message(STATUS "[MATLAB] '${Matlab_MEXEXTENSIONS_PROG}' : determined extension '${_matlab_mex_extension}' and error string is '${_matlab_mex_extension_error}'")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
unset(Matlab_MEXEXTENSIONS_PROG CACHE)
|
|
||||||
set(${mex_suffix} ${_matlab_mex_extension} PARENT_SCOPE)
|
set(${mex_suffix} ${_matlab_mex_extension} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@@ -1747,12 +1746,24 @@ else()
|
|||||||
set(_matlab_64Build TRUE)
|
set(_matlab_64Build TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if(NOT DEFINED Matlab_MEX_EXTENSION)
|
||||||
|
set(_matlab_mex_extension "")
|
||||||
|
matlab_get_mex_suffix("${Matlab_ROOT_DIR}" _matlab_mex_extension)
|
||||||
|
|
||||||
|
# This variable goes to the cache.
|
||||||
|
set(Matlab_MEX_EXTENSION ${_matlab_mex_extension} CACHE STRING "Extensions for the mex targets (automatically given by Matlab)")
|
||||||
|
unset(_matlab_mex_extension)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(_matlab_bin_prefix "mac") # i should be for intel
|
set(_matlab_bin_prefix "mac") # i should be for intel
|
||||||
set(_matlab_bin_suffix_32bits "i")
|
set(_matlab_bin_suffix_32bits "i")
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND Matlab_MEX_EXTENSION MATCHES "a64$")
|
||||||
|
# native Apple Silicon Matlab
|
||||||
set(_matlab_bin_suffix_64bits "a64")
|
set(_matlab_bin_suffix_64bits "a64")
|
||||||
else()
|
else()
|
||||||
|
# Intel Mac OR Apple Silicon using Rosetta for Matlab
|
||||||
set(_matlab_bin_suffix_64bits "i64")
|
set(_matlab_bin_suffix_64bits "i64")
|
||||||
endif()
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
@@ -1796,16 +1807,6 @@ endif()
|
|||||||
unset(_matlab_64Build)
|
unset(_matlab_64Build)
|
||||||
|
|
||||||
|
|
||||||
if(NOT DEFINED Matlab_MEX_EXTENSION)
|
|
||||||
set(_matlab_mex_extension "")
|
|
||||||
matlab_get_mex_suffix("${Matlab_ROOT_DIR}" _matlab_mex_extension)
|
|
||||||
|
|
||||||
# This variable goes to the cache.
|
|
||||||
set(Matlab_MEX_EXTENSION ${_matlab_mex_extension} CACHE STRING "Extensions for the mex targets (automatically given by Matlab)")
|
|
||||||
unset(_matlab_mex_extension)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(MATLAB_FIND_DEBUG)
|
if(MATLAB_FIND_DEBUG)
|
||||||
message(STATUS "[MATLAB] [DEBUG]_matlab_lib_prefix_for_search = ${_matlab_lib_prefix_for_search} | _matlab_lib_dir_for_search = ${_matlab_lib_dir_for_search}")
|
message(STATUS "[MATLAB] [DEBUG]_matlab_lib_prefix_for_search = ${_matlab_lib_prefix_for_search} | _matlab_lib_dir_for_search = ${_matlab_lib_dir_for_search}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user