<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 10:22 PM,  <span dir="ltr"><<a href="mailto:cmake@web.de" target="_blank">cmake@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div>Hello all,</div>

<div> </div>

<div>I'm surprised that there is no token <DOWNLOAD_DIR> available in ExternalProject.</div>

<div> </div>

<div>As written in the documentation [1] there are tokens <SOURCE_DIR>, <SOURCE_<wbr>SUBDIR>, <BINARY_DIR>, <<wbr>INSTALL_DIR>, and <TMP_DIR>. But <DOWNLOAD_DIR> seems to be missing. </div></div></div></blockquote><div><br></div><div>The relevant part of the module code is <a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/ExternalProject.cmake#L1664-1674">here</a>. It does seem to be an unexpected omission, but I don't know if there's a reason for it or not.</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px">

<div> </div>

<div>However if I have an external project with a custom DOWNLOAD_COMMAND it would be handy to be able to use <DOWNLOAD_DIR> in the following steps.</div>

<div> </div>

<div>Is there another way to know the download directory without setting it explicitely? </div></div></div></blockquote><div><br></div><div>You can retrieve it with ExternalProject_Get_Property(myExtProj DOWNLOAD_DIR), which will store the result in a variable also named DOWNLOAD_DIR. That's a bit tricky though, since you can only call that after you've defined the download command in your ExternalProject_Add() call. You could define a custom step in a subsequent call and perhaps set up dependencies between steps to get the behaviour you want, but it does seem unnecessarily fiddly.</div><div><br></div><div><br></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><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></div></div></div></div></div>
</div></div>