[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] SET(ENV {environment_variable} {value])
From:       "William A. Hoffman" <billlist () nycap ! rr ! com>
Date:       2006-09-06 23:59:13
Message-ID: 6.2.0.14.2.20060906195706.08a69f78 () pop ! nycap ! rr ! com
[Download RAW message or body]


At 06:09 PM 9/6/2006, Richard Fuchs wrote:
> I need to set an environment variable so I'm doing this:
> 
> SET(ENV{ACE_ROOT} "/work/secore-dev/secore/external/ACE_TAO/ACE_wrappers/ace")
> 
> but after cmake is run and the Makefiles are generated, I do an env and the \
> environment variable ACE_ROOT is not set. 
> When the documentation refers to an environment variable, is it referring to an \
> internal cmake environment variable? 
> VAR can be an environment variable such as:
> 
> SET( ENV{PATH} /home/martink )
> 
> in which case the environment variable will be set.
The setting of the environment variable only happens at cmake time,
and not at build time.  CMake is no longer running.   It is best
not to use environment variables in cmake files.  It is best to use
cmake cache variables.   Sounds like you need a FindACE.cmake...
The setting of env variables is really only useful in cmake/ctest scripts.

-Bill


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic