[cmake-developers] [CMake 0015036]: "make --question" always returns 1

Mantis Bug Tracker mantis at public.kitware.com
Thu Jul 24 05:48:01 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15036 
====================================================================== 
Reported By:                Simon Ask Ulsnes
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15036
Category:                   (No Category)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-07-24 05:48 EDT
Last Modified:              2014-07-24 05:48 EDT
====================================================================== 
Summary:                    "make --question" always returns 1
Description: 
In my project, I'm relying on the build system being able to answer the question
whether or not the source tree has been updated or not. Currently, Makefiles
generated by CMake do not support this usage for one reason or another.

The exit code of "make --question" should be 0 if all targets (or the specified
target) are up to date, and nonzero if changes have been made. However,
CMake-generated Makefiles always indicate that changes have been made, which
results in nontrivial work being executed unnecessarily.

Steps to Reproduce: 
1. Create simple project with a single source file and a CMakeLists.txt
2. Create the Makefile with `cmake .`
3. Run `make`.
4. Run `make --question`.
5. Observe that the exit code is 1 instead of 0, even though the source file was
not updated between steps 3 and 4.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-07-24 05:48 Simon Ask UlsnesNew Issue                                    
======================================================================



More information about the cmake-developers mailing list