<div class="gmail_quote">On Tue, Feb 17, 2009 at 12:15 AM, Philip Lowman <span dir="ltr">&lt;<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><div></div><div class="Wj3C7c">On Mon, Feb 16, 2009 at 11:03 PM, ankit jain <span dir="ltr">&lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div><br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr">&lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;</span><br>

Date: 2009/2/17<br>
Subject: Re: [CMake] setting environment variable through cmake<br>To: Philip Lowman &lt;<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>&gt;<br><br><br>
<div class="gmail_quote">2009/2/17 Philip Lowman <span dir="ltr">&lt;<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>&gt;</span> 
<div>
<div></div>
<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div class="gmail_quote">
<div>On Mon, Feb 16, 2009 at 7:46 AM, ankit jain <span dir="ltr">&lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;</span> wrote:<br></div>
<div>
<div></div>
<div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi all,</div>
<div>&nbsp;</div>
<div>I want to set an enviromnet varibale but not able to do it. </div>
<div>Currently iam using the command:</div>
<div>SET( ENV{varname} value )</div>
<div>&nbsp;</div>
<div>But it is not working.</div>
<div>Can anybody guide me how to do it by giving an example.</div></blockquote></div></div>
<div><br>Are you trying to set an environment variable that can be used during build time?&nbsp; This isn&#39;t possible.<br><a href="http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F</a><br>


<br>Could you elaborate on when you need the environment variable?<br></div></div></blockquote>
<div>&nbsp;</div></div></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><span></span>I need to set the environment variable at the time of testing since my test needs two environment variable that need to be set fro running the tests.<br>


</blockquote>
<div>Iam using cmake 2.6</div></div></div></div></div></blockquote></div></div><div><br>This should work on the latest CMake 2.6.3 RC, provided you use &quot;make test&quot;.<br><br>set_tests_properties(foo PROPERTIES ENVIRONMENT foo=bar)</div>
</div></blockquote><div><br>I&#39;ve reopened this feature request as a bug because<br>1.) using &quot;ctest&quot; does not work<br>2.) the ENVIRONMENT test property is not documented<br><br>Discovered both of these issues tonight after looking into Ankit&#39;s request and vaguely recalling this being implemented in CVS.<br>
<br><a href="http://public.kitware.com/Bug/view.php?id=7885">http://public.kitware.com/Bug/view.php?id=7885</a><br></div></div><br>-- <br>Philip Lowman<br>