<br><br>
<div class="gmail_quote">2009/2/17 Philip Lowman <span dir="ltr"><<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="gmail_quote">
<div>
<div></div>
<div class="h5">On Mon, Feb 16, 2009 at 11:03 PM, ankit jain <span dir="ltr"><<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div><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="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><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 "make test".<br><br>set_tests_properties(foo PROPERTIES ENVIRONMENT foo=bar)<br><br></div></div> I have run this but not able to set the environment variable.</blockquote>
<div> I am using cmake-2.6.3-RC-14-Linux-i386. </div>
<div> Actually i have a test t1. i want to set and unset LD_LIBRARY_PATH acc. while adding test t1 so that on running ctest it will use that value of LD_LIBRARY_PATH rather than using the older set value.</div>
<div> </div>
<div>This iam not able to achieve that.</div>
<div> </div>
<div>Guide where iam wrong and what need to be done.</div>
<div> </div>
<div> </div>
<div>Ankit</div>
<div> </div></div><br>