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">&lt;<a href="mailto:cliffyapp@gmail.com">cliffyapp@gmail.com</a>&gt;</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 &quot;CMakeified&quot; in the sense of them having CMake files<br>
for building, no... my understanding was that you don&#39;t really need<br>
ExternalProject logic if the source in question has a CMakeLists.txt<br>
file? - at least, I haven&#39;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 &quot;CMakeified&quot;.  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&#39;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&#39;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>
&gt; as:<br>&gt;<br>&gt; C:\projects\NIH2009\source\branches\trunk\platform\tools\cmake-2.8.0-win32-x86\bin&gt;cmake<br>&gt; --help-module ExternalProject<br>&gt;<br>&gt; cmake version 2.8.0<br>&gt;   ExternalProject<br>&gt;        Create custom targets to build projects in external trees<br>
&gt;<br>&gt;        The &#39;ExternalProject_Add&#39; function creates a custom target to drive<br>&gt;        download, update/patch, configure, build, install and test steps of<br>&gt; an<br>&gt;        external project:<br>
&gt;<br>&gt;          ExternalProject_Add(&lt;name&gt;    # Name for custom target<br>&gt;            [DEPENDS projects...]       # Targets on which the project<br>&gt; depends<br>&gt;            [PREFIX dir]                # Root dir for entire project<br>
&gt;            [LIST_SEPARATOR sep]        # Sep to be replaced by ; in cmd<br>&gt; lines<br>&gt;            [TMP_DIR dir]               # Directory to store temporary files<br>&gt;            [STAMP_DIR dir]             # Directory to store step timestamps<br>
&gt;           #--Download step--------------<br>&gt;            [DOWNLOAD_DIR dir]          # Directory to store downloaded<br>&gt; files<br>&gt;            [DOWNLOAD_COMMAND cmd...]   # Command to download source tree<br>
&gt;            [CVS_REPOSITORY cvsroot]    # CVSROOT of CVS repository<br>&gt;            [CVS_MODULE mod]            # Module to checkout from CVS repo<br>&gt;            [CVS_TAG tag]               # Tag to checkout from CVS repo<br>
&gt;            [SVN_REPOSITORY url]        # URL of Subversion repo<br>&gt;            [SVN_REVISION rev]          # Revision to checkout from<br>&gt; Subversion repo<br>&gt;            [URL /.../src.tgz]          # Full path or URL of source<br>
&gt;           #--Update/Patch step----------<br>&gt;            [UPDATE_COMMAND cmd...]     # Source work-tree update command<br>&gt;            [PATCH_COMMAND cmd...]      # Command to patch downloaded source<br>&gt;           #--Configure step-------------<br>
&gt;            [SOURCE_DIR dir]            # Source dir to be used for build<br>&gt;            [CONFIGURE_COMMAND cmd...]  # Build tree configuration command<br>&gt;            [CMAKE_COMMAND /.../cmake]  # Specify alternative cmake<br>
&gt; executable<br>&gt;            [CMAKE_GENERATOR gen]       # Specify generator for native build<br>&gt;            [CMAKE_ARGS args...]        # Arguments to CMake command line<br>&gt;           #--Build step-----------------<br>
&gt;            [BINARY_DIR dir]            # Specify build dir location<br>&gt;            [BUILD_COMMAND cmd...]      # Command to drive the native build<br>&gt;            [BUILD_IN_SOURCE 1]         # Use source dir for build dir<br>
&gt;           #--Install step---------------<br>&gt;            [INSTALL_DIR dir]           # Installation prefix<br>&gt;            [INSTALL_COMMAND cmd...]    # Command to drive install after<br>&gt; build<br>&gt;           #--Test step---------------<br>
&gt;            [TEST_BEFORE_INSTALL 1]     # Add test step executed before<br>&gt; install step<br>&gt;            [TEST_AFTER_INSTALL 1]      # Add test step executed after<br>&gt; install step<br>&gt;            [TEST_COMMAND cmd...]       # Command to drive test<br>
&gt;            )<br>&gt;<br>&gt;        The *_DIR options specify directories for the project, with default<br>&gt;        directories computed as follows.  If the PREFIX option is given to<br>&gt;        ExternalProject_Add() or the EP_PREFIX directory property is set,<br>
&gt; then<br>&gt;        an external project is built and installed under the specified<br>&gt; prefix:<br>&gt;<br>&gt;           TMP_DIR      = &lt;prefix&gt;/tmp<br>&gt;           STAMP_DIR    = &lt;prefix&gt;/src/&lt;name&gt;-stamp<br>
&gt;           DOWNLOAD_DIR = &lt;prefix&gt;/src<br>&gt;           SOURCE_DIR   = &lt;prefix&gt;/src/&lt;name&gt;<br>&gt;           BINARY_DIR   = &lt;prefix&gt;/src/&lt;name&gt;-build<br>&gt;           INSTALL_DIR  = &lt;prefix&gt;<br>
&gt;<br>&gt;        Otherwise, if the EP_BASE directory property is set then components<br>&gt; of<br>&gt;        an external project are stored under the specified base:<br>&gt;<br>&gt;           TMP_DIR      = &lt;base&gt;/tmp/&lt;name&gt;<br>
&gt;           STAMP_DIR    = &lt;base&gt;/Stamp/&lt;name&gt;<br>&gt;           DOWNLOAD_DIR = &lt;base&gt;/Download/&lt;name&gt;<br>&gt;           SOURCE_DIR   = &lt;base&gt;/Source/&lt;name&gt;<br>&gt;           BINARY_DIR   = &lt;base&gt;/Build/&lt;name&gt;<br>
&gt;           INSTALL_DIR  = &lt;base&gt;/Install/&lt;name&gt;<br>&gt;<br>&gt;        If no PREFIX, EP_PREFIX, or EP_BASE is specified then the default is<br>&gt;        to set PREFIX to &quot;&lt;name&gt;-prefix&quot;.  Relative paths are interpreted<br>
&gt; with<br>&gt;        respect to the build directory corresponding to the source directory<br>&gt;        in which ExternalProject_Add is invoked.<br>&gt;<br>&gt;        If SOURCE_DIR is explicitly set to an existing directory the project<br>
&gt;        will be built from it.  Otherwise a download step must be specified<br>&gt;        using one of the DOWNLOAD_COMMAND, CVS_*, SVN_*, or URL options.<br>&gt; The<br>&gt;        URL option may refer locally to a directory or source tarball, or<br>
&gt;        refer to a remote tarball (e.g.  http://.../src.tgz).<br>&gt;<br>&gt;        The &#39;ExternalProject_Add_Step&#39; function adds a custom step to an<br>&gt;        external project:<br>&gt;<br>&gt;          ExternalProject_Add_Step(&lt;name&gt; &lt;step&gt; # Names of project and<br>
&gt; custom step<br>&gt;            [COMMAND cmd...]        # Command line invoked by this step<br>&gt;            [COMMENT &quot;text...&quot;]     # Text printed when step executes<br>&gt;            [DEPENDEES steps...]    # Steps on which this step depends<br>
&gt;            [DEPENDERS steps...]    # Steps that depend on this step<br>&gt;            [DEPENDS files...]      # Files on which this step depends<br>&gt;            [ALWAYS 1]              # No stamp file, step always runs<br>
&gt;            [WORKING_DIRECTORY dir] # Working directory for command<br>&gt;            )<br>&gt;<br>&gt;        The command line, comment, and working directory of every standard<br>&gt; and<br>&gt;        custom step is processed to replace tokens &lt;SOURCE_DIR&gt;,<br>
&gt; &lt;BINARY_DIR&gt;,<br>&gt;        &lt;INSTALL_DIR&gt;, and &lt;TMP_DIR&gt; with corresponding property values.<br>&gt;<br>&gt;        The &#39;ExternalProject_Get_Property&#39; function retrieves external<br>&gt; project<br>
&gt;        target properties:<br>&gt;<br>&gt;          ExternalProject_Get_Property(&lt;name&gt; [prop1 [prop2 [...]]])<br>&gt;<br>&gt;        It stores property values in variables of the same name.  Property<br>&gt;        names correspond to the keyword argument names of<br>
&gt;        &#39;ExternalProject_Add&#39;.<br>&gt;<br><br><br>-end snip--<br><br><br>there is :<br><br>&gt;            [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>