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:<br><br>ADD_CUSTOM_TARGET( addTargets ${CMAKE_COMMAND} -DBUILD_EXTRA_TARGETS=ON ${CMAKE_SOURCE_DIR} ) <br>
ADD_CUSTOM_TARGET( removeTargets ${CMAKE_COMMAND} -DBUILD_EXTRA_TARGETS=OFF ${CMAKE_SOURCE_DIR} ) <br><br>The &#39;extra targets&#39; are all added in IF( BUILD_EXTRA_TARGETS ) blocks.<br><br>Both targets work in the sense that they seem to remove/add targets in visual studio after I close/open the IDE.<br>
<br>But the automatic reloading of the IDE seems to happen only the first time: <br>- 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. <br>
- 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 &#39;removeTargets&#39;, the targets will not be removed until the close/open the IDE. <br>
<br>Would anybody know what could be the problem? <br><br>Thanks!<br><br>Iman<br><br><div class="gmail_quote">On Fri, Jun 19, 2009 at 1:19 PM, Iman Brouwer <span dir="ltr">&lt;<a href="mailto:iman.brouwer@gmail.com">iman.brouwer@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all, <br><br>I&#39;d like to call the script that forces a reload of visual studio. Could somebody let me know where it is? <br>
<br>Thanks!<br><font color="#888888"><br>Iman<br></font><br>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&#39;d like to call the script to force the reload in this case.<br>

</blockquote></div><br>