I was a bit quick to post. It is a bit more complicated then I thought. I
have two custom targets, one that adds a bunch of targets, the other removes
it. Both work as follows:
ADD_CUSTOM_TARGET( addTargets ${CMAKE_COMMAND} -DBUILD_EXTRA_TARGETS=ON
${CMAKE_SOURCE_DIR} )
ADD_CUSTOM_TARGET( removeTargets ${CMAKE_COMMAND} -DBUILD_EXTRA_TARGETS=OFF
${CMAKE_SOURCE_DIR} )
The 'extra targets' are all added in IF( BUILD_EXTRA_TARGETS ) blocks.
Both targets work in the sense that they seem to remove/add targets in
visual studio after I close/open the IDE.
But the automatic reloading of the IDE seems to happen only the first time:
- If i build addTargets when the extra targets are not part of the solution,
the IDE will reload, but if i then build removeTargets, the targets will not
be removed until i close/open the IDE.
- Similarly, if at startup the extra targets are not part of the solution, I
can build addTargets and the IDE will automatically reload with all the
extra targets, but if i then build 'removeTargets', the targets will not be
removed until the close/open the IDE.
Would anybody know what could be the problem?
Thanks!
Iman
On Fri, Jun 19, 2009 at 1:19 PM, Iman Brouwer <[email protected]>wrote:
> Hi all,
>
> I'd like to call the script that forces a reload of visual studio. Could
> somebody let me know where it is?
>
> Thanks!
>
> Iman
>
> P.S. I would like to use it in the following situation: we have a lot of
> targets that we want to add/exclude easily. Currently, when targets are
> added, the visual studio solution is reloaded. When targets are removed
> (e.g. an add_custom_target is not called because of an if statement), the
> solution is not reloaded but instead one has to manually open/close the IDE
> to see the changes. I'd like to call the script to force the reload in this
> case.
>
_______________________________________________
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