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.tho...@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 >
_______________________________________________ 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