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

David Cole david.cole at kitware.com
Tue Oct 7 09:56:37 EDT 2008


If you run EXECUTE_PROCESS to do a checkout before ADD_SUBDIRECTORY it
should work fine. Do it conditionally though, or else you'll be doing
checkouts constantly. You probably just want to do an update if the
directory already exists...

HTH,
David

On Thu, Oct 2, 2008 at 10:16 AM, kent williams <nkwmailinglists at gmail.com>wrote:

> 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)
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081007/06b905fd/attachment.htm>


More information about the CMake mailing list