[cmake-developers] [CMake 0013139]: ninja does not rebuild external projects

Mantis Bug Tracker mantis at public.kitware.com
Mon Apr 16 18:20:51 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13139 
====================================================================== 
Reported By:                mwoehlke
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13139
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-04-16 18:20 EDT
Last Modified:              2012-04-16 18:20 EDT
====================================================================== 
Summary:                    ninja does not rebuild external projects
Description: 
External projects are not rebuilt when their sources change when using the ninja
generator (using CMake 2.8.8-rc2). It appears that even when removing the build
stamp to force a build, ninja is not re-run for the external project.

When using the Unix Makefiles generator, all is well.

Steps to Reproduce: 
- Set up an external project using the following snippet:

ExternalProject_Add(foo
  DEPENDS      ${BUILD_FOO_DEPENDENCY}
  SOURCE_DIR   ${CMAKE_CURRENT_SOURCE_DIR}/foo
  BINARY_DIR   ${CMAKE_CURRENT_BINARY_DIR}/foo
  INSTALL_DIR  ${CMAKE_INSTALL_PREFIX}
)
ExternalProject_Add_Step(foo forcebuild
  COMMAND ${CMAKE_COMMAND}
    -E remove ${CMAKE_CURRENT_BUILD_DIR}/foo-prefix/src/foo-stamp/foo-build
  DEPENDEES configure
  DEPENDERS build
  ALWAYS 1
)

- Generate two build trees; one with ninja, and one with makefiles.
- Build both build trees.
- Touch a source file in the subproject
- Rebuild both build trees.

The makefiles build tree rebuilds the external project 'foo'.

The ninja build tree reports:

[1/1] Performing forcebuild step for 'foo'

...and does not rebuild 'foo'.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-04-16 18:20 mwoehlke       New Issue                                    
======================================================================




More information about the cmake-developers mailing list