It&#39;s a substitution thing....<br><br>This:<br>&nbsp; SET (CTEST_ENVIRONMENT<br>&nbsp;&nbsp;&nbsp; &quot;RR_WARNINGS_COMMON=-Wall -Wextra&quot;<br>&nbsp;&nbsp;&nbsp; &quot;RR_WARNINGS_C=${RR_WARNINGS_COMMON} -Wno-deprecated-declarations&quot;<br>&nbsp;&nbsp;&nbsp; )<br>
doesn&#39;t work because RR_WARNINGS_COMMON is not defined as a CMake variable prior to the SET statement.<br><br>This should work, though. Maybe just change your script style a little bit...?<br>&nbsp; SET(RR_WARNINGS_COMMON &quot;-Wall -Wextra&quot;)
<br>&nbsp; SET(RR_WARNINGS_C &quot;${RR_WARNINGS_COMMON} -Wno-deprecated-declarations&quot;)<br>&nbsp; &nbsp; # etc. more cmake variables...<br>
<br>&nbsp; SET(ENV{RR_WARNINGS_COMMON} &quot;${RR_WARNINGS_COMMON}&quot;)<br>&nbsp;
SET(ENV{RR_WARNINGS_C} &quot;${RR_WARNINGS_C}&quot;)<br>
&nbsp; &nbsp; # etc. more env variables...<br>

<br><br>HTH,<br>David<br><br><br><div><span class="gmail_quote">On 10/29/07, <b class="gmail_sendername">Sean McBride</b> &lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</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;">
Hi all,<br><br>If I create a ctest script (.cmake), can I set my own environment<br>variables?&nbsp;&nbsp;I have the following:<br><br># set any extra envionment varibles here<br>SET (CTEST_ENVIRONMENT<br>&quot;RR_WARNINGS_COMMON=-Wall -Wextra&quot;
<br>&quot;RR_WARNINGS_C=${RR_WARNINGS_COMMON} -Wno-deprecated-declarations&quot;<br>&quot;RR_WARNINGS_CXX=${RR_WARNINGS_COMMON} -Woverloaded-virtual&quot;<br>&quot;RR_DEBUG_C=-gdwarf-2&quot;<br>&quot;RR_DEBUG_CXX=-gdwarf-2 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC&quot;
<br>&quot;CFLAGS=${RR_WARNINGS_C} ${RR_DEBUG_C}&quot;<br>&quot;CXXFLAGS=${RR_WARNINGS_CXX} ${RR_DEBUG_CXX}&quot;<br>)<br><br>What I&#39;m trying to do is separate Debug-only, Release-only, C-only, and C<br>++-only settings into separate env vars.&nbsp;&nbsp;This would allow me to keep my
<br>temp env vars the same in all my scripts, and I would only need to<br>change CFLAGS and CXXFLAGS like above.<br><br>But it doesn&#39;t seem to work. :(&nbsp;&nbsp;There is no error, but the flags are<br>not being applied.<br><br>
Thanks for any help!<br><br>--<br>____________________________________________________________<br>Sean McBride, B. Eng&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>Rogue Research&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.rogue-research.com">www.rogue-research.com</a><br>Mac Software Developer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Montréal, Québec, Canada<br><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>