CMake error using ExternalProject

Two days ago, I added an external project to compile the project using autotools. It worked perfectly until today ...

I have a strange error:

CMake error with / usr / share / cmake -2.8 / Modules / ExternalProject.cmake: 710 (message): error: no download information for 'libantlr3c' - specify an existing SOURCE_DIR or one of the URLs, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or DOWNLOAD_COMAND

And one of these rules is really indicated (SOURCE_DIR):

cmake_minimum_required(VERSION 2.8) # ... include(ExternalProject) ExternalProject_Add( libantlr3c SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 BUILD_COMMAND make BUILD_IN_SOURCE 1 ) 

So, this error does not matter ... And it was working fine yesterday (nothing has changed so far).

Any idea?

Thanks!

+4
source share
2 answers

This is a bug from version 2.8.0. Install version 2.8.3 or higher ...

+3
source

I had a similar problem, even with 2.8.6, and the documentation did not help much. I found an online example that gave me the clue I needed.

You need to use the url argument, but there is a catch. If you just give him the path to the director, he assumes that you point it to the archive, not the directory. You must add your path using "file: //", for example:

 ExternalProject_Add( libantlr3c URL file://${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/lib/libantlr3c-3.1.3 BUILD_COMMAND make BUILD_IN_SOURCE 1 ) 

Now I just need to find out (according to my project) why it is looking for <project>-mkdir when it does not exist.

+3
source

All Articles