<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 22, 2019 at 7:13 PM Steven Truppe <<a href="mailto:workbench@gmx.at">workbench@gmx.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF">
    <p>Hi everyone,</p>
    <p><br>
    </p>
    <p>i'm trying to use ExternalProject_Add like the following:</p>
    <pre>set(BOOST_VERSION 1.68.0)
set(BOOST_VERSION_NODOTS 1_68_0)
set(BOOST_URI <a class="gmail-m_8949568947610513073moz-txt-link-freetext" href="https://dl.bintray.com/boostorg/release/$" target="_blank">https://dl.bintray.com/boostorg/release/$</a>{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}.</pre></div></blockquote><div><br></div><div>Looking in the same directory from which you are trying to download, there is a <font face="courier new, monospace">boost_1_68_0.tar.gz.json</font> file which contains the expected sha256 sum. You would be better off using that in this case:</div><div><pre>set(BOOST_HASH da3411ea45622579d419bfda66f45cd0f8c32a181d84adfa936f5688388995cf)</pre></div><div><br></div><div>You'd also need to change the URL_HASH in your call to ExternalProject_Add():</div><pre>          URL_HASH SHA256=${BOOST_HASH}
</pre><div><br></div><div>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.</div><div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div><div><br></div><div>Get the hand-book for every CMake user: <a href="https://crascit.com/professional-cmake/" target="_blank">Professional CMake: A Practical Guide</a><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>