No subject


Thu May 27 11:52:52 EDT 2010


Running "make clean" does not remove custom command outputs. Why?=20
In CMake 2.2 and higher custom command outputs should be removed by make cl=
ean. Make sure you are using at least this version. Prior to CMake 2.2 cust=
om command outputs were not automatically added to the list of files to cle=
an. In CMake 2.0 the developer can specify a list of files to be deleted. T=
his can be done using SET_DIRECTORY_PROPERTIES setting property ADDITIONAL_=
MAKE_CLEAN_FILES to the list of files.=20

We however strongly recommend using an "out-of-source" build which never wr=
ites any files to the source tree. Using a separate source and build tree g=
reatly reduces the need for "make clean" and "make distclean" targets to cl=
ean away files that differ between builds.=20


Unfortunately, there isn't any such thing to handle removing directories...=
..


________________________________________
Kelly Hickel



From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of=
 Bob Torgerson
Sent: Friday, July 30, 2010 4:57 PM
To: cmake at cmake.org
Subject: [CMake] Adding Additional Changes to Cmake's clean target

Greetings,

I have recently been tasked with converting our old GNU makefiles to CMake =
for a medium-sized project involving both C and Fortran external components=
. CMake has made a big difference and helped make this process much more st=
raightforward for each of the researchers who are using different platforms=
 for compiling their code. However, I have had to make a few custom command=
s / targets to accomplish some of the additional work that must be done in =
order to build this project and have discovered that CMake does not automat=
ically generate new statements in its "clean" target when I use these custo=
m commands. Since one of the custom commands is as simple as copying a dire=
ctory's contents to the current source directory, I would like the clean st=
atement to simply remove these files. Does anyone know of a way to modify t=
he CMakeLists.txt file to allow for new changes to be made to the "clean" t=
arget? I have not found the answer online or in the "Mastering CMake" book.

Any help you can give me, I would appreciate greatly!

Thanks in advance,

Bob



More information about the CMake mailing list