On Wed, May 22, 2019 at 7:13 PM Steven Truppe <workbe...@gmx.at> wrote:

> Hi everyone,
>
>
> i'm trying to use ExternalProject_Add like the following:
>
> set(BOOST_VERSION 1.68.0)
> set(BOOST_VERSION_NODOTS 1_68_0)
> set(BOOST_URI 
> https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
> set(BOOST_HASH 5d8b4503582fffa9eefdb9045359c239)
>
> ExternalProject_Add(external_boost
>         PREFIX ${CMAKE_BINARY_DIR}/boost
>               URL ${BOOST_URL}
>         DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/boost
>               URL_HASH MD5=${BOOST_HASH}
>         CONFIGURE_COMMAND  cd ${CMAKE_BINARY_DIR}/boost/src/external_boost/ 
> && ./bootstrab --prefix=${OUTPUT_PATH}/boost
>               BUILD_COMMAND  cd ${CMAKE_BINARY_DIR}/boost/src/external_boost/ 
> && ./b2
>               BUILD_IN_SOURCE 1
>               INSTALL_DIR ${OUTPUT_PATH}/boost
>
> The problem is that he tells me that the md5 sum isn't correct, but i did 
> md5sum ${BOOST_URL}.
>
>
Looking in the same directory from which you are trying to download, there
is a boost_1_68_0.tar.gz.json file which contains the expected sha256 sum.
You would be better off using that in this case:

set(BOOST_HASH da3411ea45622579d419bfda66f45cd0f8c32a181d84adfa936f5688388995cf)


You'd also need to change the URL_HASH in your call to
ExternalProject_Add():

                URL_HASH SHA256=${BOOST_HASH}


Your ExternalProject_Add() command also seems to have a few typos in
various places (BOOST_URL instead of BOOST_URI, the CONFIGURE_COMMAND
contains ./bootstrab which looks suspicious) and you should use separate
COMMAND entries rather than using && to specify multiple commands for a
given stage. Have a read through the ExternalProject_Add() docs for more
details, specifically the "Miscellaneous Options" subsection.


-- 
Craig Scott
Melbourne, Australia
https://crascit.com

Get the hand-book for every CMake user: Professional CMake: A Practical
Guide <https://crascit.com/professional-cmake/>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to