Juan, Thanks for the tip! Although I did not have a file named "test", I did have a directory named "test" (that contains all of my test projects naturally). Marking the test target as phony in the Makefile resolved the issue.
It sounds like this should be fixed in the Makefile generator. There are several other targets that should be marked as phony as well. Thanks, Justin On Wednesday 26 September 2007 09:43:42 Juan Sanchez wrote: > As a followup. 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 > > Juan Sanchez wrote: > > Would you happen to have a file named "test" in your binary area? Make > > will see the file and think that the target "test" is up to date. > > > > A proper gnu makefile would mark the test target as phony. Looking at > > the gnu makefile generated by one of my projects, test is not marked as > > phony. > > > > Let me know if this is the issue. > > > > Thanks, > > > > Juan > > > > KSpam wrote: > >> I have a strange problem using CTest with Makefiles. If I run "make > >> test", ctest is never called. If I change the name of the target in the > >> Makefile from "test" to "test2" and run "make test2", then ctest is > >> called properly. > >> > >> After changing the target name, "make test" is still recognized as a > >> valid target. In other words, I do not receive the following error: > >> > >> make: *** No rule to make target `test'. Stop. > >> > >> It seems like make has its own internal test target and it will not use > >> the test target from the Makefile. Does anyone know what is going on > >> here or how to fix it? > >> > >> Thanks, > >> Justin > >> _______________________________________________ > >> CMake mailing list > >> CMake@cmake.org > >> http://www.cmake.org/mailman/listinfo/cmake _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake