<div>If you use ctest scripts (<a href="http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest">http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest</a>&nbsp;) like&nbsp;this one from vtk:</div>
<div><a href="http://www.vtk.org/Testing/Sites/hythloth.kitware/Linux-gcc41/20080220-0300-Nightly/Notes.html">http://www.vtk.org/Testing/Sites/hythloth.kitware/Linux-gcc41/20080220-0300-Nightly/Notes.html</a></div>
<div>&nbsp;</div>
<div>You can set the CTEST_ENVIRONMENT as it does:</div>
<div># set any extra envionment variables here<br>SET (CTEST_ENVIRONMENT<br>&nbsp; &quot;DISPLAY=:50&quot;<br>&nbsp; &quot;CC=gcc-4.1&quot;<br>&nbsp; &quot;CXX=g++-4.1&quot;<br>&nbsp; &quot;CFLAGS=-Wall -W&quot;<br>&nbsp; &quot;CXXFLAGS=-Wall -W -Woverloaded-virtual -Wunused -Wno-deprecated&quot;<br>
&nbsp; &quot;LD_LIBRARY_PATH=${LD_LIBRARY_PATH}&quot;<br>&nbsp; )<br><br>Also, the ctest scripts specify all of the cmake cache options for your project.</div>
<div>itk (<a href="http://www.itk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html">http://www.itk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html</a>&nbsp;)</div>
<div>and</div>
<div>vtk (<a href="http://www.vtk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html">http://www.vtk.org/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html</a>&nbsp;)</div>
<div>&nbsp;</div>
<div>both make extensive use of ctest scripting. On these dashboards, click on the text icon next to the build name to see (for most builds) the ctest script that is used to create that configure/build/test submission.</div>

<div>&nbsp;</div>
<div>Bill<br></div>
<div class="gmail_quote">On Wed, Feb 20, 2008 at 10:28 AM, Jörg Becker &lt;<a href="mailto:news@elke-joerg.de">news@elke-joerg.de</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Tuesday, 19. February 2008 19:20:46 Philip Lowman wrote:<br>&gt; What you&#39;re looking for to the best of my knowledge doesn&#39;t exist in<br>
&gt; CMake. &nbsp;I would file a feature request on the bugtracker for it. &nbsp;There<br>&gt; probably should be a way for declaring custom environment variables and<br>&gt; associating them with tests scheduled with ADD_TEST (the PATH environment<br>
&gt; variable for Windows comes to mind as one possible use case).<br>&gt;<br>done<br><br>&gt; If you&#39;re using the makefile generator you can obviously just declare<br>&gt; environment variables prior to running your tests. &nbsp;If you&#39;re using Visual<br>
&gt; Studio to execute your tests you&#39;re probably out of luck here. &nbsp;Best bet<br>&gt; would be to revert to testing them in command line mode:<br>&gt;<br>I tried &#39;set( ENV{ICU_DATA} &quot;foo&quot; )&#39; with the same result (variable not set<br>
within test session).<br><br>&gt; (or for Unix/Makefile generator using bash)<br>&gt; user@host:~/build$ export foo=bar &nbsp; &nbsp;(Unix, bash)<br>&gt; user@host:~/build$ ctest<br>&gt;<br>Yes, this is the way it works. But it&#39;s not very comfortable.<br>
<br>&#39;make test&#39; would be much easier than &#39;make depend;export foo=bar;ctest&#39;.<br>Especially if there where more than one environment variable to be set.<br>
<div>
<div></div>
<div class="Wj3C7c"><br><br>Thanks,<br>Jörg<br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>