Fixed warning in CMake when MATLAB not found

master
ismagom 10 years ago
parent c7b2a7a499
commit 4429d45761

@ -84,14 +84,22 @@ 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( execute_process(
COMMAND which matlab COMMAND which matlab
COMMAND xargs readlink OUTPUT_VARIABLE MATLAB_BIN_EXISTS
COMMAND xargs dirname )
COMMAND xargs dirname
COMMAND xargs echo -n IF (MATLAB_BIN_EXISTS)
OUTPUT_VARIABLE MATLAB_ROOT execute_process(
) COMMAND which matlab
COMMAND xargs readlink
COMMAND xargs dirname
COMMAND xargs dirname
COMMAND xargs echo -n
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