> On 19 Feb 2015, at 22:24, Brad King <brad.k...@kitware.com> wrote:
> 
> 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:
> 
> [snip]

I cannot reproduce with this simple example. However, on next, I did that (line 
990):

     find_program(
        _matlab_main_tmp 
        NAMES matlab)
      message(FATAL_ERROR "is find matlab correct? ${_matlab_main_tmp}")

The error message is

CMake Error at /is/ps2/renficiaud/Code/CMake/Modules/FindMatlab.cmake:993 
(message):
  is find matlab correct?
Call Stack (most recent call first):
  CMakeLists.txt:11 (find_package)


Then I did that:

     find_program(
        matlab_main_tmp 
        NAMES matlab)
      message(FATAL_ERROR "is find matlab correct? ${matlab_main_tmp}")

and the error message is 

CMake Error at /is/ps2/renficiaud/Code/CMake/Modules/FindMatlab.cmake:993 
(message):
  is find matlab correct? /usr/bin/matlab
Call Stack (most recent call first):
  CMakeLists.txt:11 (find_package)


The functionality works then, there is something else with the variable itself. 
Some lines before I uses the same variable name

set(_matlab_main_tmp "")

I just unset this variable before the call to the find_program, and now it 
works good. Basically the variable is not overwritten, maybe because another 
one is created in the cache?
Any hint? Known behaviour?

I'll do the fix and remove the "which matlab" then (so we dropped the # of 
"find matlab" from 4 to 2 in one day).

Best,
Raffi

-- 

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