[CMake] Passing environment variables in Windows

Leo Breebaart leo at lspace.org
Wed Jan 14 11:54:11 EST 2009


Bill Hoffman <bill.hoffman at kitware.com> writes:

> Mathieu Malaterre wrote:
>
> >      <variable> can be an environment variable such as:
> > 
> >          set( ENV{PATH} /home/martink )
> > 
> >        in which case the environment variable will be set.

Sorry, I probably should have mentioned it, but didn't want to
clutter up my original mail with a list of all the things I tried
that did not work. That was one of 'em. :-)

> But if you want it to run at custom command time, you would
> have to do it as a cmake script. Currently there is not a way
> to set environment variables to be used during the running of
> custom commands without creating a cmake script.

I was afraid of that, but it's good to have it confirmed. Thanks!

-- 
Leo Breebaart  <leo at lspace.org>



More information about the CMake mailing list