[CMake] set environment variable scope
Kaleb Pederson
kaleb.pederson at gmail.com
Fri Mar 28 20:20:32 EDT 2008
On Friday 28 March 2008, Bill Hoffman wrote:
> Kaleb Pederson wrote:
> > What's the best way to set an environment variable that will be active
> > for a custom target or command?
[snip]
> There is currently not a direct way to do this. You would have to
> create a cmake -P script and call the set(ENV in there. The issue is
> cmake time vs build time. When that custom command gets run, the cmake
> process is long gone.
I was wondering if that is what was happening. Although I knew that the
environment variable was being set immediately, I didn't know if the
makefiles were (or should be) setup such that they would preserve it.
Thanks for the workaround.
--Kaleb
>
> -Bill
More information about the CMake
mailing list