[CMake] building an autoconf project with externalproject

Josh Stratton strattonbrazil at gmail.com
Sun Mar 16 10:25:34 EDT 2014


I found another example where they had a CONFIGURE_COMMAND.  Adding that
with "configure" before the BUILD_COMMAND seemed to work.

http://stackoverflow.com/questions/7770583/cmake-change-prefix-in-externalproject-add-depending-on-operating-system


On Sun, Mar 16, 2014 at 12:49 AM, Alan W. Irwin
<irwin at beluga.phys.uvic.ca>wrote:

> On 2014-03-15 23:06-0700 Josh Stratton wrote:
>
>  I'm trying to get cmake to compile an autoconf external library that comes
>> with my git repo.  I've found an example on stackoverflow that supposedly
>> works, but I get an error message saying no CMakeLists.txt exists in that
>> directory.
>>
>> http://stackoverflow.com/questions/16604815/cmake-
>> reuse-externalproject-depends-does-not-work
>>
>> I figured because BUILD_DIR is set to "make", I wouldn't need a
>> CMakeLists.txt file in that directory.  Anyway, I tried including an empty
>> one and get a "no rule to make target install", which is closer, but still
>> not correct as I'm not calling "make install", right?
>>
>> Here's my root CMakeLists.txt.  Is there another argument or something to
>> get this to work?  Why does including "make" give an "install" message?
>>  If
>> I'm doing the whole autoconf workflow, do I need the full set of commands
>> "configure; make; make install" or is cmake doing some fancy logic?
>>
>> cmake_minimum_required(VERSION 2.8)
>>
>> project(ppml)
>>
>> include(ExternalProject)
>>
>> ExternalProject_Add(
>>  fftw
>>  DOWNLOAD_COMMAND ""
>>  SOURCE_DIR /home/stratton/Public/ppml/external/fftw-3.3.3
>>  BUILD_COMMAND make
>>  BUILD_IN_SOURCE 1
>> )
>>
>
> The documentation says
>
> # If SOURCE_DIR is explicitly set to an existing directory the project
> # will be built from it.
> # Otherwise a download step must be specified using one of the
> # DOWNLOAD_COMMAND, [...]
>
> So my guess is you should drop the DOWNLOAD_COMMAND entirely rather than
> specifying an empty string for it.
>
> If that doesn't work, there are other alternatives which I know do work.
>
> Alan
>
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140316/6301a2ee/attachment.html>


More information about the CMake mailing list