This issue is related:<div><a href="http://public.kitware.com/Bug/view.php?id=2828">http://public.kitware.com/Bug/view.php?id=2828</a></div><div><br></div><div>...and still open.</div><div><br></div><div>I'd have to dig to find if there is a current way to distinguish the two cases... but a variable, like CMAKE_IS_RUNNING_IN_SCRIPT_MODE as you suggest, sure would be nice, wouldn't it?</div>
<div><br></div><div><br></div><div><br><div class="gmail_quote">On Thu, May 13, 2010 at 11:41 AM, Benoit Thomas <span dir="ltr"><<a href="mailto:benoit.thomas@gameloft.com">benoit.thomas@gameloft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
Is there any way to know if my code is running script mode (cmake -P) or normal mode ? I wanna do something like this:<br>
<br>
if (CMAKE_IS_RUNNING_IN_SCRIPT_MODE)<br>
# do some special stuff<br>
else()<br>
# do the normal stuff<br>
endif()<br>
<br>
Thank you,<br>
-- <br>
Ben.<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>