On Mon, Nov 27, 2017 at 10:22 PM, <cm...@web.de> wrote:

> Hello all,
>
> I'm surprised that there is no token <DOWNLOAD_DIR> available in
> ExternalProject.
>
> As written in the documentation [1] there are tokens <SOURCE_DIR>, <SOURCE_
> SUBDIR>, <BINARY_DIR>, <INSTALL_DIR>, and <TMP_DIR>. But <DOWNLOAD_DIR>
> seems to be missing.
>

The relevant part of the module code is here
<https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/ExternalProject.cmake#L1664-1674>.
It does seem to be an unexpected omission, but I don't know if there's a
reason for it or not.




>
> 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.
>
> Is there another way to know the download directory without setting it
> explicitely?
>

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.




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

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:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to