[CMake] Makefiles and clean target
Stephen Quinney
squinney at inf.ed.ac.uk
Mon Apr 28 08:58:27 EDT 2008
I realise that cmake encourages out-of-source builds but occasionally
I need to do some builds in the source tree. I have a project where I
want to make use of "make clean" to tidy up afterwards but I am having
problems. I get:
[kingsbarns]squinney: make clean
make[1]: *** No rule to make target `clean'. Stop.
make: *** [clean] Error 2
there is a clean target in the generated Makefile:
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
but there isn't a corresponding clean target in the
CMakeFiles/Makefile2 file. I presume I am missing something obvious
here. For what it's worth this is with version 2.6.0 RC8 but I had the
same problem with the latest 2.4 release.
Stephen Quinney
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the CMake
mailing list