<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 10:04 AM, Micha Renner <span dir="ltr"><<a href="mailto:Micha.Renner@t-online.de" target="_blank">Micha.Renner@t-online.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am Mittwoch, den 13.06.2012, 14:51 +0200 schrieb Robert Carnecky:<br>
> Hello,<br>
><br>
> My Visual Studio 2010 is constantly prompting me to build ZERO_CHECK<br>
> every time I try to run my program, even though nothing has changed. Is<br>
> there a workaround for this?<br>
<br>
No, that is the current situation. This problem and some others belong<br>
to a complex of problems which CMake has with Visual Studio since 2008.<br>
May be it becomes better with VS 2012.<br>
<br>
Micha<br>
<br>
<br>
><br>
> How to reproduce:<br>
> 1. Set up the simplest project possible (see below).<br>
> 2. Configure and generate using the CMake GUI.<br>
> 3. Open the project file and build the project. Project successfully builds.<br>
> 4. Start the application from within Visual Studio (press F5). A message<br>
> box appears, saying "This project is out of date: ZERO_CHECK. Would you<br>
> like to build it?".<br>
> 5. Click on yes. ZERO_CHECK is built, no actual code gets compiled. The<br>
> application starts and exits.<br>
> 6. Go to step 4 (message box appears again).<br>
><br>
> I do not want to enable automatic rebuilds without prompts, since I have<br>
> other projects where a build can take very long and I do not want to<br>
> start it when not necessary. Starting a build immediately deletes the<br>
> executable file and I would not be able to run the last version while<br>
> making changes to the code.<br>
><br>
> Thanks in advance,<br>
> Robert<br>
><br>
><br>
> CMakeLists.txt:<br>
> project(test)<br>
> cmake_minimum_required (VERSION 2.8.8)<br>
> add_executable(main main.cpp)<br>
><br>
> main.cpp:<br>
> int main() {return 0;}<br>
><br>
> System:<br>
> CMake 2.8.8<br>
> Visual Studio 2010, 64bit compiler<br>
> Windows 7 64bit<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>
<br>
<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>Did you set your startup project? ZERO_CHECK will be the default but you can override it by right clicking on the actual project you wish to run and choosing "Set as Startup Project" in visual studio. I believe this is a user specific setting in visual studio (not a project setting) so you always have to do this through the GUI. I dont think there is anything in your CMakeLists.txt you can do to work around it.<br clear="all">
<br>-- <br>Jonathan S. Romero<br>