View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015923CMakeCMakepublic2016-01-18 07:202016-06-10 14:31
ReporterMads Brix 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSLinuxOS Version
Product VersionCMake 3.4.1 
Target VersionFixed in Version 
Summary0015923: Makefile is written/updated even if there are errors in cmake.
DescriptionIf there is an error when running cmake (e.g. because of misspelled source file name) the Makefile will be written.
This means that the next time one runs make, compilation is attempted (since the Makefile is up-to-date), and therefore the output is a compilation error, and not the (root cause) error from running cmake.

With ninja this does not happen - the build.ninja is only written/updated if cmake execution is error free.

Another situation is where a succesful build has been done, and error is then introduced (e.g. by spelling mistake when adding new source file).

Correction would be to change Makefile generator to work like Ninja generator and only write/update Makefile if cmake is error free.

Found with cmake 3.3.2, also present in 3.4.1.
Steps To Reproduce1) create directories source, build.Ninja, build.Make.
2) create simple CMakeLists.txt in source directory:
project (TestMakefileError)
add_executable(TestMakefileError NonExistentFile.cc)
3) In build.Make run: "cmake ../source/"
Error from cmake is reported, but Makefile is written, so when running make the cmake error is not reported.
4) In build.Ninja run. "cmake -G Ninja ../source/"
Error from cmake is reported, but build.ninja is not written.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042914)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-01-18 07:20 Mads Brix New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042914
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team