I am posting this back to cmake so others can follow along. I too use gmail and often forget the reply all.<br><br><div class="gmail_quote">On Thu, Aug 19, 2010 at 9:11 PM, Clifford Yapp <span dir="ltr"><<a href="mailto:cliffyapp@gmail.com">cliffyapp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Um... if you mean "CMakeified" in the sense of them having CMake files<br>
for building, no... my understanding was that you don't really need<br>
ExternalProject logic if the source in question has a CMakeLists.txt<br>
file? - at least, I haven't needed it in those cases. zlib and libpng<br>
I can both build and use to build other code in the same project with<br>
ADD_SUBDIRECTORY and some variable setting (a very cool feature!)<br>
<br></blockquote><div><br>some do some do not has been my experience. Some have forced me to use add_subdirectory (boost) and others work best with ExternalProject_ADD (vtk vtkedge itk). Yes if source in question has CMakelist.txt then it is in my terms "CMakeified". I have used externalproject_add and add_subdirectory, but my mileage has varied based on how it was written. In my opinion add_subdirectory and externalproject_add are effectively broken due <br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I may be thinking about this wrong, but here's the specific situation<br>
which prompted the question:<br>
<br>
I have in my source tree local checkouts of tcl and tk:<br>
<br>
src/other/tcl<br>
src/other/tk<br>
<br>
These trees use autotools to build - they have no knowledge of CMake.<br></blockquote><div><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
What I had hoped to do was use ExternalProject to trigger the<br>
./configure process as part of the CMake configure and the make<br>
processes as a product of the CMake generated make files, or on WIN32<br>
incorporate the Microsoft Visual Studio project files into its own<br>
project output - have I mis-understood it's purpose?<br>
<br></blockquote><div> from :<br><br><a href="http://public.kitware.com/pipermail/cmake/2010-January/034908.html">http://public.kitware.com/pipermail/cmake/2010-January/034908.html</a><br><br>specifically <br><br>-snip-<br>
> as:<br>><br>> C:\projects\NIH2009\source\branches\trunk\platform\tools\cmake-2.8.0-win32-x86\bin>cmake<br>> --help-module ExternalProject<br>><br>> cmake version 2.8.0<br>> ExternalProject<br>> Create custom targets to build projects in external trees<br>
><br>> The 'ExternalProject_Add' function creates a custom target to drive<br>> download, update/patch, configure, build, install and test steps of<br>> an<br>> external project:<br>
><br>> ExternalProject_Add(<name> # Name for custom target<br>> [DEPENDS projects...] # Targets on which the project<br>> depends<br>> [PREFIX dir] # Root dir for entire project<br>
> [LIST_SEPARATOR sep] # Sep to be replaced by ; in cmd<br>> lines<br>> [TMP_DIR dir] # Directory to store temporary files<br>> [STAMP_DIR dir] # Directory to store step timestamps<br>
> #--Download step--------------<br>> [DOWNLOAD_DIR dir] # Directory to store downloaded<br>> files<br>> [DOWNLOAD_COMMAND cmd...] # Command to download source tree<br>
> [CVS_REPOSITORY cvsroot] # CVSROOT of CVS repository<br>> [CVS_MODULE mod] # Module to checkout from CVS repo<br>> [CVS_TAG tag] # Tag to checkout from CVS repo<br>
> [SVN_REPOSITORY url] # URL of Subversion repo<br>> [SVN_REVISION rev] # Revision to checkout from<br>> Subversion repo<br>> [URL /.../src.tgz] # Full path or URL of source<br>
> #--Update/Patch step----------<br>> [UPDATE_COMMAND cmd...] # Source work-tree update command<br>> [PATCH_COMMAND cmd...] # Command to patch downloaded source<br>> #--Configure step-------------<br>
> [SOURCE_DIR dir] # Source dir to be used for build<br>> [CONFIGURE_COMMAND cmd...] # Build tree configuration command<br>> [CMAKE_COMMAND /.../cmake] # Specify alternative cmake<br>
> executable<br>> [CMAKE_GENERATOR gen] # Specify generator for native build<br>> [CMAKE_ARGS args...] # Arguments to CMake command line<br>> #--Build step-----------------<br>
> [BINARY_DIR dir] # Specify build dir location<br>> [BUILD_COMMAND cmd...] # Command to drive the native build<br>> [BUILD_IN_SOURCE 1] # Use source dir for build dir<br>
> #--Install step---------------<br>> [INSTALL_DIR dir] # Installation prefix<br>> [INSTALL_COMMAND cmd...] # Command to drive install after<br>> build<br>> #--Test step---------------<br>
> [TEST_BEFORE_INSTALL 1] # Add test step executed before<br>> install step<br>> [TEST_AFTER_INSTALL 1] # Add test step executed after<br>> install step<br>> [TEST_COMMAND cmd...] # Command to drive test<br>
> )<br>><br>> The *_DIR options specify directories for the project, with default<br>> directories computed as follows. If the PREFIX option is given to<br>> ExternalProject_Add() or the EP_PREFIX directory property is set,<br>
> then<br>> an external project is built and installed under the specified<br>> prefix:<br>><br>> TMP_DIR = <prefix>/tmp<br>> STAMP_DIR = <prefix>/src/<name>-stamp<br>
> DOWNLOAD_DIR = <prefix>/src<br>> SOURCE_DIR = <prefix>/src/<name><br>> BINARY_DIR = <prefix>/src/<name>-build<br>> INSTALL_DIR = <prefix><br>
><br>> Otherwise, if the EP_BASE directory property is set then components<br>> of<br>> an external project are stored under the specified base:<br>><br>> TMP_DIR = <base>/tmp/<name><br>
> STAMP_DIR = <base>/Stamp/<name><br>> DOWNLOAD_DIR = <base>/Download/<name><br>> SOURCE_DIR = <base>/Source/<name><br>> BINARY_DIR = <base>/Build/<name><br>
> INSTALL_DIR = <base>/Install/<name><br>><br>> If no PREFIX, EP_PREFIX, or EP_BASE is specified then the default is<br>> to set PREFIX to "<name>-prefix". Relative paths are interpreted<br>
> with<br>> respect to the build directory corresponding to the source directory<br>> in which ExternalProject_Add is invoked.<br>><br>> If SOURCE_DIR is explicitly set to an existing directory the project<br>
> will be built from it. Otherwise a download step must be specified<br>> using one of the DOWNLOAD_COMMAND, CVS_*, SVN_*, or URL options.<br>> The<br>> URL option may refer locally to a directory or source tarball, or<br>
> refer to a remote tarball (e.g. http://.../src.tgz).<br>><br>> The 'ExternalProject_Add_Step' function adds a custom step to an<br>> external project:<br>><br>> ExternalProject_Add_Step(<name> <step> # Names of project and<br>
> custom step<br>> [COMMAND cmd...] # Command line invoked by this step<br>> [COMMENT "text..."] # Text printed when step executes<br>> [DEPENDEES steps...] # Steps on which this step depends<br>
> [DEPENDERS steps...] # Steps that depend on this step<br>> [DEPENDS files...] # Files on which this step depends<br>> [ALWAYS 1] # No stamp file, step always runs<br>
> [WORKING_DIRECTORY dir] # Working directory for command<br>> )<br>><br>> The command line, comment, and working directory of every standard<br>> and<br>> custom step is processed to replace tokens <SOURCE_DIR>,<br>
> <BINARY_DIR>,<br>> <INSTALL_DIR>, and <TMP_DIR> with corresponding property values.<br>><br>> The 'ExternalProject_Get_Property' function retrieves external<br>> project<br>
> target properties:<br>><br>> ExternalProject_Get_Property(<name> [prop1 [prop2 [...]]])<br>><br>> It stores property values in variables of the same name. Property<br>> names correspond to the keyword argument names of<br>
> 'ExternalProject_Add'.<br>><br><br><br>-end snip--<br><br><br>there is :<br><br>> [CONFIGURE_COMMAND cmd...] # Build tree configuration command<br><br>so may be this works. I have not used it so I can not speak to it.<br>
<br>problem will be if on Windows systems is finding an autotools that would work such as cygwin or msys.<br><br>As far a documentation on ExternalProject_ADD, the fact that we must use the command line to get documentation speaks volumes how difficult it can be to learn this command. There is also a kitware pdf (<a href="http://www.kitware.com/products/archive/kitware_quarterly1009.pdf">http://www.kitware.com/products/archive/kitware_quarterly1009.pdf</a>) which made some vague refrences to ExternalProject_ADD. I hope others could chime in that know the command better. If stuck do what I do and look through the CMake source code... best documentation there is... on how it *realy* works.<br>
<br></div><br>
</div><br>