Commit 31c58d23 authored by hbristow's avatar hbristow

Streamlined mexext detection, with removal of trailing whitespace/newlines…

Streamlined mexext detection, with removal of trailing whitespace/newlines handled by execute_process
parent 86b7e3d1
...@@ -125,15 +125,13 @@ endfunction() ...@@ -125,15 +125,13 @@ endfunction()
# sets the variable MATLAB_FOUND to TRUE # sets the variable MATLAB_FOUND to TRUE
function(locate_matlab_components MATLAB_ROOT_DIR) function(locate_matlab_components MATLAB_ROOT_DIR)
# get the mex extension # get the mex extension
if (UNIX) find_file(MATLAB_MEXEXT_SCRIPT_ NAMES mexext mexext.bat PATHS ${MATLAB_ROOT_DIR}/bin NO_DEFAULT_PATH)
execute_process(COMMAND ${MATLAB_ROOT_DIR}/bin/mexext OUTPUT_VARIABLE MATLAB_MEXEXT_) execute_process(COMMAND ${MATLAB_MEXEXT_SCRIPT_}
elseif (WIN32) OUTPUT_VARIABLE MATLAB_MEXEXT_
execute_process(COMMAND ${MATLAB_ROOT_DIR}/bin/mexext.bat OUTPUT_VARIABLE MATLAB_MEXEXT_) OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if (NOT MATLAB_MEXEXT_) if (NOT MATLAB_MEXEXT_)
return() return()
endif() endif()
string(STRIP ${MATLAB_MEXEXT_} MATLAB_MEXEXT_)
# map the mexext to an architecture extension # map the mexext to an architecture extension
set(ARCHITECTURES_ "maci64" "maci" "glnxa64" "glnx64" "sol64" "sola64" "win32" "win64" ) set(ARCHITECTURES_ "maci64" "maci" "glnxa64" "glnx64" "sol64" "sola64" "win32" "win64" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment