[CMake] set environment variable

Mark Wyszomierski markww at gmail.com
Tue Oct 30 10:37:56 EDT 2007


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
> >
>
>


More information about the CMake mailing list