[cmake-developers] [CMake 0012499]: VS 2010 custom rules with no output need to not have a command line

Mantis Bug Tracker mantis at public.kitware.com
Thu Oct 6 12:48:05 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12499 
====================================================================== 
Reported By:                James Bigler
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12499
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-10-06 12:48 EDT
Last Modified:              2011-10-06 12:48 EDT
====================================================================== 
Summary:                    VS 2010 custom rules with no output need to not have
a command line
Description: 
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)


Steps to Reproduce: 
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).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-10-06 12:48 James Bigler   New Issue                                    
2011-10-06 12:48 James Bigler   File Added: cmake-extra-build.7z                
   
======================================================================




More information about the cmake-developers mailing list