[CMake] Two toolchains simultaneously within the same project?

David Cole david.cole at kitware.com
Fri Sep 28 06:55:45 EDT 2012


On Fri, Sep 28, 2012 at 4:19 AM, Ingolf Steinbach <
ingolf.steinbach at gmail.com> wrote:

> Hi
>
> 2012/7/24 Alexander Neundorf <a.neundorf-work at gmx.net>:
> > Maybe you can use external_project() for that subdirectory ?
>
> I have not been successful with that command. Probably, I have
> misunderstood something. Please see this example:
>
> my_project
>   |
>   +- CMakeLists.txt
>   |
>   +- external
>        +...
>
> The top level CMakeLists.txt content:
> cmake_minimum_required(VERSION 2.8)
> include(ExternalProject)
> ExternalProject_Add(external SOURCE_DIR "${CMAKE_SOURCE_DIR}/external")
>
> When I run cmake (2.8.0), I get the following error message:
> CMake Error at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:710
> (message):
>   error: no download info for 'external' -- please specify existing
>   SOURCE_DIR or one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY
> or
>   DOWNLOAD_COMMAND
> Call Stack (most recent call first):
>   /usr/share/cmake-2.8/Modules/ExternalProject.cmake:941
> (_ep_add_download_command)
>   CMakeLists.txt:3 (ExternalProject_Add)
>
>
> What is wrong with the SOURCE_DIR specification in the top level
> CMakeLists.txt? "${CMAKE_SOURCE_DIR}/external" expands to the correct
> absolute path to the (existing) "external" subdirectory of my_project.
>
> Kind regards
> Ingolf
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


Please try with a more recent CMake version. The most recent release is
2.8.9. ExternalProject was first introduced in 2.8.0, and many many issues
have been fixed in it over the last 2 years.

Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120928/fd6ccecf/attachment.htm>


More information about the CMake mailing list