You could detect that your desired env vars are empty in your CMakeLists.txt and have CMake emit an error.<br><br>IF(&quot;$ENV{my_env_var}&quot; STREQUAL &quot;&quot;)<br>&nbsp; MESSAGE(FATAL_ERROR &quot;error: required env var not set - please set my_env_var in your environment before running cmake/make/make test&quot;)<br>
ENDIF(&quot;$ENV{my_env_var}&quot; STREQUAL &quot;&quot;)<br><br>Then at least all your developers would know early on that they have to set env vars before running your cmake/make/make test sequence.<br><br><br><div><span class="gmail_quote">On 2/20/08, <b class="gmail_sendername">Jörg Becker</b> &lt;<a href="mailto:news@elke-joerg.de">news@elke-joerg.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wednesday, 20. February 2008 16:48:39 Bill Lorensen wrote:<br> &gt; You can set the CTEST_ENVIRONMENT as it does:<br> <br> <br>As I wrote in my first mail, I&#39;m failed using CTEST_ENVIRONMENT inside a<br> CMakeLists.txt. I have not tried this in a special ctest script because I&#39;m<br>
 searching for lean solution. Which means write a &#39;CMakeList.txt&#39; once,<br> run &#39;cmake&#39; once and be able to run &#39;make test&#39; for every change on my<br> software. My problem is: there is make test target, I want to use it, but all<br>
 tests fail because of the missing environment variables.<br> <br> Maintaining a ctest script besides the CMakeLists.txt is too much effort for<br> my current purpose. As described in<br> <a href="http://www.cmake.org/Wiki/CMake_Testing_With_CTest">http://www.cmake.org/Wiki/CMake_Testing_With_CTest</a> &quot;Simple Testing&quot;<br>
 (&quot;The easiest way to create CTest input files is using CMake.&quot;), I just want<br> to generate / call the tests within the build process (with the existing test<br> target), and not define/maintain a parallel build/test process.<br>
 <br><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">http://www.cmake.org/mailman/listinfo/cmake</a><br>
 </blockquote></div><br>