[CMake] Visual Studio rebuilding ZERO_CHECK

Robert Carnecky crobi at inf.ethz.ch
Wed Jun 13 08:51:19 EDT 2012


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?

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


More information about the CMake mailing list