[CMake] set environment variable

David Cole david.cole at kitware.com
Tue Oct 30 10:23:15 EDT 2007


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/0911b30d/attachment.htm


More information about the CMake mailing list