[CMake] Using CMake to bootstrap a build source tree via CVS/SVN

kent williams nkwmailinglists at gmail.com
Thu Oct 2 10:16:56 EDT 2008


Right now we have a Slicer3 style 'getbuildtest' script to check out a
bunch of Kitware packages in order to build an application.  This
basically works like this

for all packages,
  check out the package
  configure it with cmake
  build it.

Since the 'configure it with cmake' step is redundant over a series of
patches, it seems like you should be able to user CMake to manage the
whole process, but I'm not sure that's true.  What I'd like to end up
with the CMakeLists.txt file below.  The question is this: I can
certainly run CVS or SVN with EXECUTE_PROCESS, but will that happen
early enough in the CMake config process that the ADD_SUBDIRECTORY
clauses will be able to actually find the checked out subdirectories?

Or should I just punt and have a 'check everything out' script I run
before running CMake?


PROJECT(MyProjectBuild)
#
# check out all the source from various places

#
# set all CMake variables for the packages

ADD_SUBDIRECTORY(tk)
ADD_SUBDIRECTORY(tcl)
ADD_SUBDIRECTORY(Insight)
ADD_SUBDIRECTORY(VTK)
ADD_SUDIRECTORY(vtkinria3d)
ADD_SUBDIRECTORY(MyProject)


More information about the CMake mailing list