[CMake] setting environment variable through cmake

Philip Lowman philip at yhbt.com
Mon Feb 16 21:23:37 EST 2009


On Mon, Feb 16, 2009 at 7:46 AM, ankit jain <ankitguddu at gmail.com> wrote:

> Hi all,
>
> I want to set an enviromnet varibale but not able to do it.
> Currently iam using the command:
> SET( ENV{varname} value )
>
> But it is not working.
> Can anybody guide me how to do it by giving an example.
>

Are you trying to set an environment variable that can be used during build
time?  This isn't possible.
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F

Could you elaborate on when you need the environment variable?

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090216/32310b49/attachment.htm>


More information about the CMake mailing list