[CMake] set environment variable

David Cole david.cole at kitware.com
Tue Oct 30 11:00:26 EDT 2007


Yes, that's exactly what I mean... :-)


On 10/30/07, Mark Wyszomierski <markww at gmail.com> wrote:
>
> Hi David,
>
> I'm new to linux, do you mean that setting the env var like that
> through CMake will only affect my executables during run time- in
> other words the env var is only set for my exes? That's fine and what
> I need -
>
> Mark
>
> On 10/30/07, David Cole <david.cole at kitware.com> wrote:
> > Yes...
> >
> > SET(ENV{BLAH} "blah value")
> >
> > ...but it only applies to the running process. The parent process
> > environment remains unaffected by this type of SET.
> >
> > Then, to read env vars into cmake, use "$ENV{BLAH}"
> >
> >
> >
> > On 10/30/07, Mark Wyszomierski <markww at gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > Is it possible to set an environment variable (linux) through CMake?
> > >
> > > Thanks,
> > > Mark
> > > _______________________________________________
> > > CMake mailing list
> > > CMake at cmake.org
> > > http://www.cmake.org/mailman/listinfo/cmake
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071030/6a6539c3/attachment.html


More information about the CMake mailing list