[Cmake] Pb with CVS distribution

Bill Hoffman bill.hoffman at kitware.com
Tue Aug 27 08:53:25 EDT 2002


To use an outside environment variable in cmake, you have
to do a $ENV{VAR}, so for HOME it would be $ENV{HOME}.   
However, I would recommend not using environment variables like HOME
in CMakeList.txt files.   A CMakeList.txt file should work on 
different computers without requiring an environment variable to
be set.  CMake creates several variables with the project name:
PROJECT(FOO)

FOO_SOURCE_DIR = the path to the root of the source tree 
FOO_BINARY_DIR = the path to the root of the build tree

-Bill


At 03:24 PM 8/26/2002 -0700, Thomas Deschamps wrote:
>Hi,
>
>I just downloaded the CMake-1.4.3 version, and it looks like the macro defined
>in my .cshrc, like ${HOME} are deactivated if I used them in the CMakeList.txt
>They are treated as a blanck character.
>I want to keep these macros since they are useful to keep the same
>CMakeList.txt on different computers.
>How can I handle this?
>
>Thomas




More information about the CMake mailing list