View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013067CMake(No Category)public2012-03-26 10:562012-08-09 17:10
ReporterMatthew McCormick 
Assigned ToPeter Collingbourne 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSLinuxOS Version
Product Version 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013067: Ninja: Invalid build.ninja after hitting CMake error. "unknown build rule 'RERUN_CMAKE'"
Description(Using CMake master (0000046:0000002.8.8rc1))

I successfully generated a project with the Ninja generator.

Then, I edit the CMakeLists.txt and introduce and error (as I often do ;-P), e.g., a non-existing file name to add_executable:

$ ninja
[1/1] Re-running CMake...
FAILED: /home/matt/apps/cmake_rb/bin/cmake -H/home/matt/progs/calaTK -B/home/matt/apps/calatk_rdb
-- Configuring done
CMake Error at Code/Testing/CMakeLists.txt:231 (add_executable):
  Cannot find source file:

    calatkApplicationImageFileNameInputesTest.cxx

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


-- Build files have been written to: /home/matt/apps/calatk_rdb
ninja: ERROR: rebuilding 'build.ninja': subcommand failed


I fix the error, then I re-run ninja, and:

$ ninja
ninja: ERROR: build.ninja:18: unknown build rule 'RERUN_CMAKE'
build build.ninja: RERUN_CMAKE | /home/matt/apps/calatk_rdb/CMakeFiles/C...
                 ^ near here

build.ninja is attached

Running cmake manually fixes the error, but it would be nice if that was not necessary.
Steps To Reproducesee above
TagsNo tags attached.
Attached Files? file icon build.ninja [^] (22,888 bytes) 2012-03-26 10:56
? file icon rules.ninja [^] (430 bytes) 2012-03-26 11:06

 Relationships

  Notes
(0028971)
Nicolas Despres (reporter)
2012-03-26 11:03

Rules are defined in the rules.ninja file. Can you check/attach this file so that we can see if RERUN_CMAKE is present. Normally this file is included at the beginning of the build.ninja file.
(0028972)
Matthew McCormick (reporter)
2012-03-26 11:07

File uploaded. It looks good to my naive eye. A ninja bug? I am using ninja master (abd33d5e3b).
(0029490)
Peter Collingbourne (developer)
2012-05-16 19:06

I've pushed a fix for this issue to next.
(0029531)
Matthew McCormick (reporter)
2012-05-21 14:33

It looks like it has now been merged into master. I tested it, and it looks to fix my problem. Thank you!

 Issue History
Date Modified Username Field Change
2012-03-26 10:56 Matthew McCormick New Issue
2012-03-26 10:56 Matthew McCormick File Added: build.ninja
2012-03-26 11:03 Nicolas Despres Note Added: 0028971
2012-03-26 11:06 Matthew McCormick File Added: rules.ninja
2012-03-26 11:07 Matthew McCormick Note Added: 0028972
2012-03-26 11:30 Brad King Assigned To => Peter Collingbourne
2012-03-26 11:30 Brad King Status new => assigned
2012-05-16 19:06 Peter Collingbourne Note Added: 0029490
2012-05-21 14:33 Matthew McCormick Note Added: 0029531
2012-07-03 05:55 Peter Kuemmel Status assigned => resolved
2012-07-03 05:55 Peter Kuemmel Resolution open => fixed
2012-08-09 16:53 David Cole Fixed in Version => CMake 2.8.9
2012-08-09 16:53 David Cole Target Version => CMake 2.8.9
2012-08-09 17:10 Matthew McCormick Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team