Fixed warning in CMake when MATLAB not found

master
ismagom 10 years ago
parent c7b2a7a499
commit 4429d45761

@ -84,6 +84,13 @@ else()
if((NOT DEFINED MATLAB_ROOT) if((NOT DEFINED MATLAB_ROOT)
OR ("${MATLAB_ROOT}" STREQUAL "")) OR ("${MATLAB_ROOT}" STREQUAL ""))
# get path to the Matlab root directory # get path to the Matlab root directory
execute_process(
COMMAND which matlab
OUTPUT_VARIABLE MATLAB_BIN_EXISTS
)
IF (MATLAB_BIN_EXISTS)
execute_process( execute_process(
COMMAND which matlab COMMAND which matlab
COMMAND xargs readlink COMMAND xargs readlink
@ -92,6 +99,7 @@ else()
COMMAND xargs echo -n COMMAND xargs echo -n
OUTPUT_VARIABLE MATLAB_ROOT OUTPUT_VARIABLE MATLAB_ROOT
) )
ENDIF (MATLAB_BIN_EXISTS)
endif() endif()
# Check if this is a Mac # Check if this is a Mac

Loading…
Cancel
Save