[CMake] Problems with ExternalProject_Add and tar.gz files

Ben Medina ben.medina at gmail.com
Fri Apr 2 16:40:41 EDT 2010


I'm trying to get ExternalProject_Add to work, using a tar.gz file as
the source. My experiment thus far is with boost, and my code looks
like this:

    include (ExternalProject)
    set (boost_libs_to_build program_options)
    ExternalProject_Add(
        boost
        URL http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz
        CMAKE_ARGS -DBUILD_PROJECT=${boost_libs_to_build}
    )

This produces the boost target, as expected, but building the target
results in failure:

2>Performing download step (download and extract) for 'boost'
2>-- downloading...
2>     src='http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz'
2>     dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>     timeout='none'
2>-- downloading... done
2>-- extracting...
2>     src='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>     dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost'
2>-- extracting... [tar xfz]
2>CMake Error: Problem with tar_extract_all(): Invalid argument
2>CMake Error: Problem extracting tar:
C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz
2>-- extracting... [error clean up]
2>CMake Error at boost-stamp/extract-boost.cmake:30 (message):
2>  error: extract of
2>  'C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>  failed

Is there any way to know exactly what is going wrong with the extraction?

Thanks,
Ben


More information about the CMake mailing list