MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0013474 | CMake | CMake | public | 2012-08-15 11:29 | 2014-01-15 10:31 | ||||||||||
Reporter | Brad King | ||||||||||||||
Assigned To | Alex Neundorf | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | fixed | ||||||||||||
Platform | OS | OS Version | |||||||||||||
Product Version | CMake 2.8.9 | ||||||||||||||
Target Version | CMake 2.8.10 | Fixed in Version | CMake 2.8.10 | ||||||||||||
Summary | 0013474: CMake Makefile generator does not re-scan dependencies if object fails to build | ||||||||||||||
Description | While tracking down behavior reported in issue 0013471 I narrowed it down to a test case not involving Fortran. If a source file fails to produce an object file, perhaps due to a compilation error, then the user typically edits it to fix the error. On the next "make" CMake should re-scan dependencies of the modified file. It doesn't always do this. See steps to reproduce. | ||||||||||||||
Steps To Reproduce | $ cat ../CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(bug CXX) add_executable(bug bug.cxx) $ cat ../bug.hxx int bug(void) { return 0; } $ cat ../bug.cxx //#include "bug.hxx" int main() { return bug(); } $ cmake .. && make ... Scanning dependencies of target bug [100%] Building CXX object CMakeFiles/bug.dir/bug.cxx.o .../bug.cxx: In function ‘int main()’: .../bug.cxx:2:25: error: ‘bug’ was not declared in this scope $ vi ../bug.cxx && cat ../bug.cxx #include "bug.hxx" int main() { return bug(); } $ make [100%] Building CXX object CMakeFiles/bug.dir/bug.cxx.o Linking CXX executable bug [100%] Built target bug # The above should have re-scanned. Now it does not know about bug.hxx: $ touch ../bug.hxx $ make [100%] Built target bug # The above should have re-compiled. One can work around the problem with an explicit "make depend": $ make depend $ make Scanning dependencies of target bug [100%] Building CXX object CMakeFiles/bug.dir/bug.cxx.o Linking CXX executable bug [100%] Built target bug | ||||||||||||||
Additional Information | |||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | |||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2012-08-15 11:29 | Brad King | New Issue | |||||||||||||
2012-08-15 11:30 | Brad King | Relationship added | related to 0013471 | ||||||||||||
2012-08-15 11:34 | Brad King | Assigned To | => Alex Neundorf | ||||||||||||
2012-08-15 11:34 | Brad King | Status | new => assigned | ||||||||||||
2012-08-15 14:10 | Amine Chadly | Note Added: 0030673 | |||||||||||||
2012-08-15 14:32 | Sylwester Arabas | Note Added: 0030674 | |||||||||||||
2012-08-15 15:36 | Alex Neundorf | Note Added: 0030675 | |||||||||||||
2012-08-15 15:57 | Alex Neundorf | Note Added: 0030676 | |||||||||||||
2012-08-15 16:27 | Brad King | Note Added: 0030677 | |||||||||||||
2012-08-16 16:49 | Alex Neundorf | Note Added: 0030686 | |||||||||||||
2012-08-17 17:21 | Alex Neundorf | Note Added: 0030694 | |||||||||||||
2012-08-17 17:21 | Alex Neundorf | Status | assigned => closed | ||||||||||||
2012-08-17 17:21 | Alex Neundorf | Resolution | open => fixed | ||||||||||||
2012-08-20 14:10 | David Cole | Fixed in Version | => CMake 2.8.10 | ||||||||||||
2012-08-20 14:10 | David Cole | Target Version | => CMake 2.8.10 | ||||||||||||
2014-01-15 10:31 | Brad King | Relationship added | related to 0014699 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|