<div class="gmail_quote">On Mon, Feb 16, 2009 at 11:03 PM, ankit jain <span dir="ltr"><<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>></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 class="Wj3C7c"><br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr"><<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>></span><br>
Date: 2009/2/17<br>
Subject: Re: [CMake] setting environment variable through cmake<br>To: Philip Lowman <<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>><br><br><br>
<div class="gmail_quote">2009/2/17 Philip Lowman <span dir="ltr"><<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>></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"><<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>></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> </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> </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? This isn'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> </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><br>This should work on the latest CMake 2.6.3 RC, provided you use "make test".<br><br>set_tests_properties(foo PROPERTIES ENVIRONMENT foo=bar)<br>
<br></div></div><br>-- <br>Philip Lowman<br>