MantisBT - CMake
View Issue Details
0012499CMakeCMakepublic2011-10-06 12:482016-06-10 14:31
James Bigler 
Kitware Robot 
normalminoralways
closedmoved 
VS 2010 SP1Win7x64
CMake 2.8.6 
 
0012499: VS 2010 custom rules with no output need to not have a command line
I've noticed with some of my projects that the ZERO_CHECK project always runs. I think I narrowed it down to the fact that the rule for ZERO_CHECK.rule has a command line. The custom build machinery in VS 2010 seems to think that because the Output file, which in this case is non-existent and designed to be that way, needs to be built.


                     D:\WIN7X64\BUGS\CMAKE-EXTRA-BUILD\BUILD-64-VS10\CMAKEFILES\ZERO_CHECK does not exist; source compilation required. (TaskId:14)
                     CMakeFiles\ZERO_CHECK.rule will be compiled. (TaskId:14)

If I remove the script from the command line that seems to do nothing, then the build behaves the way that it should.

                     setlocal
                     :cmEnd
                     endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
                     :cmErrorLevel
                     exit /b %1
                     :cmDone
                     if %errorlevel% neq 0 goto :VCEnd (TaskId:14)
I've attached a simple CMake project.

1. Configure it and build twice. The second build will always build the ZERO_CHECK project.

2. Open the Property Pages for ZERO_CHECK.rule and remove the contents of the Command Line entry.

3. Delete the files in <build>/x64/Debug/ZERO_CHECK/* This is needed to update the custom target files found in this directory that are used by MSbuild to determine dependencies.

4. Build twice. The second build will not rebuild the ZERO_CHECK project.

Editing the CMakeLists.txt file will cause a rebuild as expected (though it will overwrite your local changes to the project files).
No tags attached.
7z cmake-extra-build.7z (653) 2011-10-06 12:48
https://public.kitware.com/Bug/file/4068/cmake-extra-build.7z
Issue History
2011-10-06 12:48James BiglerNew Issue
2011-10-06 12:48James BiglerFile Added: cmake-extra-build.7z
2011-10-11 13:04David ColeAssigned To => David Cole
2011-10-11 13:04David ColeStatusnew => assigned
2012-03-15 05:58Jan Eric KyprianidisNote Added: 0028921
2012-03-15 05:59Jan Eric KyprianidisNote Edited: 0028921bug_revision_view_page.php?bugnote_id=28921#r573
2012-08-13 15:40David ColeStatusassigned => backlog
2012-08-13 15:40David ColeNote Added: 0030619
2012-11-21 14:57David ColeNote Added: 0031652
2012-11-21 15:01David ColeAssigned ToDavid Cole =>
2016-06-10 14:28Kitware RobotNote Added: 0041910
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0028921)
Jan Eric Kyprianidis   
2012-03-15 05:58   
(edited on: 2012-03-15 05:59)
Looking at the property page for ZERO_CHECK.rule one can see that "Outputs" of the Custom Build Tool properties is defined to a file <build>\CMakeFiles\ZERO_CHECK. This file, however, is never created/updated.

I guess if no command is defined then the build system doesn't check the output.

The same problem seem to exits for ALL_BUILD and maybe other custom targets.

Simply creating the missing <build>\CMakeFiles\ZERO_CHECK by hand seems to work as workaround.

(0030619)
David Cole   
2012-08-13 15:40   
Sending old, not-recently-updated issues to the backlog.

(The age of the bug alone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0031652)
David Cole   
2012-11-21 14:57   
Un-assigning bugs that are not on the active roadmap, which no developers are actively working on for the CMake 2.8.11 release.

If one gets put back on the roadmap, re-assign it appropriately at that time.
(0041910)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.