1
0
mirror of synced 2024-12-23 05:00:01 +01:00

17 lines
1.0 KiB
Markdown
Raw Normal View History

2018-03-29 19:30:00 +02:00
# GoogleTest: Download method
2018-03-30 15:15:37 +02:00
## Downloading Method: build time
2018-03-29 19:30:00 +02:00
2018-03-30 15:15:37 +02:00
Until CMake 3.11, the primary download method for packages was done at build time. This causes several issues; most important of which is that `add_subdirectory` doesn't work on a file that doesn't exist yet! The tool for this, ExternalProject, has to work around this by doing the build itself. (It can, however, build non-CMake packages as well).[^1]
2018-03-29 19:30:00 +02:00
2018-03-30 15:15:37 +02:00
[^1]: Note that ExternalData is the tool for non-package data.
2018-03-29 19:30:00 +02:00
2018-03-30 15:15:37 +02:00
## Downloading Method: configure time
2018-03-29 19:30:00 +02:00
2018-03-30 15:15:37 +02:00
If you prefer configure time, see the [Crascit/DownloadProject](https://github.com/Crascit/DownloadProject) repository for a drop-in solution. Submodules work so well, though, that I've discontinued most of the downloads for things like GoogleTest and moved them to submodules. Auto downloads are harder to mimic if you
don't have internet access, and they are often implemented in the build directory, wasting time and space if you have multiple build directories.
2018-03-29 19:30:00 +02:00
[DownloadProject]: https://github.com/Crascit/DownloadProject