From c1144325c6ca031c465255cfeae0bbec3abbde9a Mon Sep 17 00:00:00 2001 From: Alexey Kreschuk Date: Fri, 15 Apr 2016 16:36:50 +0300 Subject: [PATCH] Update FindMATLAB.cmake There are two problems with `readlink`: 1) it might give a path relative to the symlink location, 2) if matlab bin directory is in $PATH it will yield nothing. The use of `realpath` solves both of them. --- cmake/modules/FindMATLAB.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindMATLAB.cmake b/cmake/modules/FindMATLAB.cmake index 882775156..1339ea77a 100644 --- a/cmake/modules/FindMATLAB.cmake +++ b/cmake/modules/FindMATLAB.cmake @@ -93,7 +93,7 @@ else() IF (MATLAB_BIN_EXISTS) execute_process( COMMAND which matlab - COMMAND xargs readlink + COMMAND xargs realpath COMMAND xargs dirname COMMAND xargs dirname COMMAND xargs echo -n