[CMake] A few newbie "how to" questions

Alexander Neundorf a.neundorf-work at gmx.net
Fri Mar 9 16:50:35 EST 2007


-------- Original-Nachricht --------
Datum: Fri, 9 Mar 2007 15:22:04 -0500
Von: Simon Perreault <nomis80 at nomis80.org>
An: cmake at cmake.org
CC: 
Betreff: [CMake] A few newbie "how to" questions

> Hello,
> 
> I'm using CMake for building the source code of a research project where a
> few 
> people of diverse level of technicality will contribute. It will have to
> be 
> buildable in Visual Studio as well as under Linux.
> 
> I have a few simple questions on how to do stuff with CMake. Hopefully
> someone 
> can donate a few minutes and answer at least one of them. ;) Thanks in 
> advance. (I've done my homework: I read the documentation many times, as
> well 
> as the FAQ and the wiki.)
> 
> 1. A few files require the Matlab libraries and include. This package is 
> installed in varied and unpredictable places, and therefore I chose to
> force 
> the user to specify the MATLABROOT variable manually. I used the following
> code:
> 
> IF (NOT DEFINED MATLABROOT)
>     MESSAGE(FATAL_ERROR "Please define the MATLABROOT variable.")
> ENDIF (NOT DEFINED MATLABROOT)
> 
> Then I run cmake with "cmake -DMATLABROOT=/path/to/matlab ." and it
> works.
> However, if I do "touch CMakeLists.txt; make" it fails, requiring me to 
> specify MATLABROOT once again instead of fetching it from the cache.
> What is the correct way to do this?

This means it didn't go in the cache.
Which version of cmake  is this ?
Does it help if you also specify the type of the variable ?

Bye
Alex

-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out


More information about the CMake mailing list