[CMake] Script Mode

David Cole david.cole at kitware.com
Thu May 13 13:54:25 EDT 2010


This issue is related:
http://public.kitware.com/Bug/view.php?id=2828

...and still open.

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?



On Thu, May 13, 2010 at 11:41 AM, Benoit Thomas
<benoit.thomas at gameloft.com>wrote:

> Hello,
>
> Is there any way to know if my code is running script mode (cmake -P) or
> normal mode ? I wanna do something like this:
>
> if (CMAKE_IS_RUNNING_IN_SCRIPT_MODE)
>    # do some special stuff
> else()
>    # do the normal stuff
> endif()
>
> Thank you,
> --
> Ben.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100513/09c97892/attachment.htm>


More information about the CMake mailing list