On 02/19/2015 04:15 PM, Raffi Enficiaud wrote:
> renficiaud@madeira3:~$ ls -al /is/software/matlab/linux/R2014a/bin/matlab
> -r-xr-xr-x 1 stark is 55331 Dec 27  2013 
> /is/software/matlab/linux/R2014a/bin/matlab
> 
> r permission are definitively there and the user is allowed to run this 
> command.

Hmm.  See if you can reproduce it with something simple like:

 $ cat test.cmake
 find_program(MATLAB NAMES matlab)
 message(MATLAB=${MATLAB})
 $ cmake -P test.cmake

Then build your own CMake with -DCMAKE_BUILD_TYPE=Debug and run it in
a debugger to track down what goes wrong.  Set a breakpoint on
"cmsys::SystemTools::FileExists" to step through the low level checks.

> BTW, I cannot see in the documentation that find_program unwraps symlinks.

I meant that when checking for existence and permissions it uses
something equivalent to "stat" as against "lstat".  A broken symlink
is not considered to exist.  It certainly doesn't resolve symlinks
in the returned path.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to