[cmake-developers] Introduction and volunteering for the Matlab package
Raffi Enficiaud
raffi.enficiaud at free.fr
Thu Feb 19 16:58:57 EST 2015
> On 19 Feb 2015, at 22:24, Brad King <brad.king at kitware.com> wrote:
>
> On 02/19/2015 04:15 PM, Raffi Enficiaud wrote:
>> renficiaud at 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
More information about the cmake-developers
mailing list