<div dir="ltr">Make that &quot;cmake -P&quot; (not cmake -S) &nbsp; &nbsp; -S is the run this script arg to ctest...<br><br><div><br><div class="gmail_quote">On Fri, Aug 15, 2008 at 11:45 AM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">Gregory C. Sharp wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bill Hoffman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gregory C. Sharp wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I found this little tidbit in the FAQ:<br>
<br>
 &nbsp;[E]nvironment variables SET in the CMakeLists.txt only take<br>
 &nbsp;effect for cmake itself, so you cannot use this method to set<br>
 &nbsp;an environment variable that a custom command might need.<br>
<br>
I would like to augment the path during a custom command.<br>
Is there a suggested workaround?<br>
<br>
</blockquote>
Run a cmake script in the custom command that runs the program via execute_process.<br>
</blockquote>
<br>
OK. &nbsp;I might need another hint though. &nbsp;I try this:<br>
<br>
 &nbsp;MACRO(RUNME)<br>
 &nbsp; &nbsp;EXECUTE_PROCESS(...)<br>
 &nbsp;ENDMACRO(RUNME)<br>
<br>
 &nbsp;ADD_CUSTOM_COMMAND(OUTPUT output COMMAND RUNME ...)<br>
<br>
Which yields:<br>
<br>
 &nbsp;1&gt; &#39;RUNME&#39; is not recognized as an internal or external command<br>
<br>
-Greg<br>
</blockquote></div>
add_custom_command(OUTPUT output COMMAND ${CMAKE_COMMAND} -S myscript.cmake)<br>
<br>
myscript.cmake:<br>
set(ENV{PATH} ...)<br>
execute_process(....)<br>
<br>
<br>
-Bill<br><font color="#888888">
<br>
-- <br>
Bill Hoffman<br>
Kitware, Inc.<br>
28 Corporate Drive<br>
Clifton Park, NY 12065<br>
<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a><br>
<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
518-371-3971 (phone and fax)</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">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></div></div>