[CMake] Visual Studio rebuilding ZERO_CHECK

J Decker d3ck0r at gmail.com
Wed Jun 13 11:14:43 EDT 2012


On Wed, Jun 13, 2012 at 7:29 AM, Jonathan Romero <jonnyro at jonnyro.com> wrote:
>
>
> On Wed, Jun 13, 2012 at 10:04 AM, Micha Renner <Micha.Renner at t-online.de>
> wrote:
>>
>> Am Mittwoch, den 13.06.2012, 14:51 +0200 schrieb Robert Carnecky:
>> > Hello,
>> >
>> > My Visual Studio 2010 is constantly prompting me to build ZERO_CHECK
>> > every time I try to run my program, even though nothing has changed. Is
>> > there a workaround for this?
>>
>> No, that is the current situation. This problem and some others belong
>> to a complex of problems which CMake has with Visual Studio since 2008.
>> May be it becomes better with VS 2012.
>>
>> Micha
>>
>>
>> >
>> > How to reproduce:
>> > 1. Set up the simplest project possible (see below).
>> > 2. Configure and generate using the CMake GUI.
>> > 3. Open the project file and build the project. Project successfully
>> > builds.
>> > 4. Start the application from within Visual Studio (press F5). A message
>> > box appears, saying "This project is out of date: ZERO_CHECK. Would you
>> > like to build it?".
>> > 5. Click on yes. ZERO_CHECK is built, no actual code gets compiled. The
>> > application starts and exits.
>> > 6. Go to step 4 (message box appears again).
>> >
>> > I do not want to enable automatic rebuilds without prompts, since I have
>> > other projects where a build can take very long and I do not want to
>> > start it when not necessary. Starting a build immediately deletes the
>> > executable file and I would not be able to run the last version while
>> > making changes to the code.
>> >
>> > Thanks in advance,
>> > Robert
>> >
>> >
>> > CMakeLists.txt:
>> > project(test)
>> > cmake_minimum_required (VERSION 2.8.8)
>> > add_executable(main main.cpp)
>> >
>> > main.cpp:
>> > int main() {return 0;}
>> >
>> > System:
>> > CMake 2.8.8
>> > Visual Studio 2010, 64bit compiler
>> > Windows 7 64bit
>> > --
>> >
>> > 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
>
>
> 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.
>

It doesn't matter what project is startup, it's got an always-build
sort of condition.  (but that's what catches changes if you modify
cmakelists.txt and rebuild)

> --
> Jonathan S. Romero
>
> --
>
> 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


More information about the CMake mailing list