View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005785CMakeCMakepublic2007-09-26 12:502008-05-01 10:22
Reporterufnoise 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005785: cmake fails to run tests if the file "test" exists.
DescriptionA proper gnu makefile would mark the test target as phony. Looking at
the gnu makefile generated by one of my cmake projects, test is not marked as
phony. If a file named test exists, then the tests will no longer run. Example below.

Please mark test, install, and any other dummy target as PHONY in the generated Makefile.


If I "touch test", the test no longer runs. If I add
the PHONY target to the Makefile. The tests still run.

 ~/bar> make test

Running tests...
Start processing tests
Test project /home/juans/bar
  1/ 1 Testing foo Passed

100% tests passed, 0 tests failed out of 1
 ~/bar> make test
Running tests...
Start processing tests
Test project /home/juans/bar
  1/ 1 Testing foo Passed

100% tests passed, 0 tests failed out of 1
 ~/bar> touch test
 ~/bar> make test
 ~/bar>

 ~/bar> echo ".PHONY: test" >> Makefile

 ~/bar> make test
Running tests...
Start processing tests
Test project /home/juans/bar
  1/ 1 Testing foo Passed



TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0009301)
Justin (reporter)
2007-09-26 13:47

This is also a problem if a directory named "test" exists.
(0011644)
Brad King (manager)
2008-05-01 10:22

The "test" target is properly marked as PHONY by the upcoming CMake 2.6.0 release.

 Issue History
Date Modified Username Field Change
2007-09-26 12:50 ufnoise New Issue
2007-09-26 13:47 Justin Note Added: 0009301
2007-10-12 09:48 Bill Hoffman Status new => assigned
2007-10-12 09:48 Bill Hoffman Assigned To => Brad King
2008-05-01 10:22 Brad King Status assigned => closed
2008-05-01 10:22 Brad King Note Added: 0011644
2008-05-01 10:22 Brad King Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team