[Cmake] excluding files + keeping a clean tree
John Biddiscombe
jbiddiscombe at skippingmouse . co . uk
Mon, 18 Jun 2001 13:01:33 +0100
Part 1)
When building vtk for example, there are a number of files which don't
compile well (eg vtkVRMLImporter), and a few dozen other files which I will
never use (EnsightReaders...for example)
I'd like to add in a
INCLUDE( file containing my extra defs)
to several CMakeLists.txt files
Is there a command that I can use to EXCLUDE_SRC(....list) : exclude a list
of source files from the already defined SRC list.
Part 2)
With the above in mind. I prefer to have a clean CVS tree so that when I do
modify files for a specific purpose, I know exactly what's what. I'd prefer
to not modify cmakelists.txt files directly, or if I must, at least keep
the changes to a minimum. The above question could be solved by deleting
some entries from the cmakelists files, but this may cause later conflicts
when checking out from cvs (or just be messy). A single INCLUDE line would
be easier to maintain.
What would be even easier is a command in the root directory cmakelists
file such as
AUTOINCLUDE_LOCAL(myCMakelists.txt)
which would automatically look for a file myCMakelists.txt in every SUBDIR
when it was searching for cMakelists.txt. If not present, it'd just skip
it, but if present, would include it too. This'd make a clean way of
modifying any subdirectory, (eg adding part 1's Exclude_SRC command)
without CVS detecting any modified files, handy when working on CVS
maintained projects. Is there a way of achieving this already, if not, any
objection to adding it?
JB