summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
Commit message (Collapse)AuthorAgeFilesLines
* ExternalProject: Improve documentationCraig Scott2017-07-171-374/+821
| | | | | | | | | | | - Added clearer structure by grouping the options into logical sections. - Expanded the details for many of the options. - Added Examples section to show how to use the various commands. - Specifically highlighted that the contents of SOURCE_DIR may be lost if a download method is also provided. - Updated argument-matching regex to be more robust and account for the varying leading spaces before keywords in the docs. - Updated tests to account for slightly changed error messages.
* Use string(APPEND) in ModulesDaniel Pfeifer2017-05-171-4/+4
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* ExternalProject: Run `git checkout` with `--` to clarify argumentsBrad King2017-04-031-4/+10
| | | | | | | | | Fix the case when the tag name to be checked out also happens to match a path name. Unfortunately we cannot do this for Git versions prior to 1.8.5 because they do not "do what I mean" to checkout remote branches when the `--` argument is given. Fixes: #16678
* Merge topic 'ExternalProject-fix-remote-branch'Brad King2017-04-031-1/+4
|\ | | | | | | | | | | | | 6f3838c0 ExternalProject: Fix regression in GIT_TAG with remote branch name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !649
| * ExternalProject: Fix regression in GIT_TAG with remote branch nameBrad King2017-03-311-1/+4
| | | | | | | | | | | | | | | | | | | | The change in commit v3.8.0-rc2~7^2 (ExternalProject: Run `git checkout` with `--` to clarify arguments, 2017-02-24) broke the case of `GIT_TAG some-remote-branch` because an explicit `--` means that the preceding argument is a tree-ish instead of a branch. Revert the change and leave a comment. Fixes: #16763
| * Merge branch 'ExternalProject-checkout-clarify' into releaseBrad King2017-02-241-1/+1
| |\
* | | ExternalProject: only append `COMMAND` if actually adding a commandBen Boeckel2017-02-271-3/+2
| | | | | | | | | | | | Fixes #16544.
* | | Merge topic 'ExternalProject-checkout-clarify'Brad King2017-02-271-1/+1
|\ \ \ | |/ / |/| / | |/ | | a9fa6a2c ExternalProject: Run `git checkout` with `--` to clarify arguments
| * ExternalProject: Run `git checkout` with `--` to clarify argumentsBrad King2017-02-241-1/+1
| | | | | | | | | | | | | | Fix the case when the tag name to be checked out also happens to match a path name. Fixes: #16678
* | ExternalProject: Clarify documented role of `INSTALL_DIR`Brad King2017-02-211-1/+4
| | | | | | | | | | | | It does not actually configure the project to install to the given location. That must be done by passing the `<INSTALL_DIR>` placeholder to the external project configuration step.
* | ExternalProject: Clarify documented role of `INSTALL_COMMAND`Wilfried Goesgens2017-02-211-1/+5
|/ | | | | It is for the install step of the external project and does not affect installation of the calling project.
* ExternalProject: Restore case-insensitive download hash checkBrad King2017-01-171-1/+1
| | | | | | | | | | Refactoring in commit v3.6.0-rc1~47^2 (ExternalProject: Re-implement download logic as a dedicated script, 2016-05-19) accidentally made the download hash check case-sensitive. The hash comparison is done in hex strings, so restore case-insensitive comparison since the case of the hex digits does not matter. Fixes: #16568
* ExternalProject: Do not trip over pre-existing 'cmd' variableKarsten Sperling2016-11-171-68/+65
| | | | | | | | | Callers of `_ep_get_build_command` do not initialize the output variable they pass and expect the function to unconditionally set it. Revise the function to not check its own output variable. Otherwise if a `cmd` variable happens to be set when `ExternalProject_Add` is called then it will be erroneously used as the default `BUILD`, `TEST`, and `INSTALL` command.
* Merge topic 'add-SHA-3'Brad King2016-11-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f636d1e7 Help: Add notes for topic 'add-SHA-3' cb5dba8e Tests: Add SHA-3 algorithm coverage to CPack checksum test a9fa6099 ExternalProject: Add support for SHA-3 algorithms b4ffd26f ExternalData: Add support for SHA-3 algorithms 60939702 file: Add support for SHA-3 algorithms 92f95aed string: Add support for SHA-3 algorithms c326209f cmCryptoHash: Add support for SHA-3 algorithms 979e8ba6 Help: De-duplicate and spell out supported hash algorithms 7a79f7e3 librhash: Activate SHA-3 implementation 87584b5e Merge branch 'upstream-librhash' into add-SHA-3 7fcbd47e librhash 2016-11-06 (de79828d) c50c32a3 librhash: Update import script to add SHA-3 implementation
| * ExternalProject: Add support for SHA-3 algorithmsBrad King2016-11-111-1/+1
| |
* | ExternalProject: Fix UPDATE_DISCONNECTED with empty update stepsBrad King2016-11-151-2/+2
| | | | | | | | | | | | | | | | | | When `UPDATE_DISCONNECTED` is enabled the post-update steps unconditionally depend on a `skip-update` step instead of `update`. Make `skip-update` available whenever `UPDATE_DISCONNECTED` is enabled, whether there is a real update step or not. Closes: #16428
* | ExternalProject: Allow passing config flags to git cloneChristian Fetzer2016-11-091-2/+12
|/ | | | | | | Add a `GIT_CONFIG` parameter that allows to specify `--config` flags that are passed to the git clone command. This can be used to specify for example `core.autocrlf=true`. The `--config` parameter is supported since Git 1.7.7.
* Merge topic 'external-project-clone-progress'Brad King2016-10-201-3/+14
|\ | | | | | | | | | | e89fbfaf ExternalProject: support GIT_PROGRESS argument 64aa29b7 ExternalProject: fix typo
| * ExternalProject: support GIT_PROGRESS argumentBen Boeckel2016-10-181-2/+13
| |
| * ExternalProject: fix typoBen Boeckel2016-10-181-1/+1
| |
* | ExternalProject: support extracting the configure commandBen Boeckel2016-10-191-20/+27
| | | | | | | | | | | | | | | | | | Previously, the configure command generated by ExternalProject was not accessible prior to actually adding the targets. This makes the CMake configure command accessible with just a call to _ep_parse_arguments. Future work will leverage this to support custom environment settings on a per-project basis.
* | Merge topic 'external-project-source-subdir-usage'Brad King2016-10-191-8/+9
|\ \ | |/ |/| | | | | | | 615f3ed2 ExternalProject: make SOURCE_SUBDIR directly appendable fdce782b ExternalProject: error out only if the property is unset
| * ExternalProject: make SOURCE_SUBDIR directly appendableBen Boeckel2016-10-181-6/+6
| | | | | | | | | | This allows it to be used in expansions without being conditional based on its value.
| * ExternalProject: error out only if the property is unsetBen Boeckel2016-10-181-2/+3
| | | | | | | | | | Property values may be empty; instead make sure they exist and allow for empty values.
* | ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGSMax Smolens2016-10-101-1/+1
|/ | | | | | | | | | Fix passing a list to the CMAKE_CACHE_ARGS and CMAKE_CACHE_DEFAULT_ARGS options of ExternalProject_Add. Following commit v3.7.0-rc1~273^2~1 (prefer list(APPEND) over string(APPEND) where appropriate, 2016-08-08), the semicolon list separator after the first list element was missing in the generated cache.
* Simplify CMake per-source license noticesBrad King2016-09-271-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* ExternalProject: Add HTTP_HEADERRuslan Baratov2016-09-191-2/+16
|
* ExternalProject: Add HTTP_{USERNAME,PASSWORD}Ruslan Baratov2016-09-151-2/+15
|
* Merge topic 'ExternalProject-SOURCE_SUBDIR'Brad King2016-08-161-5/+23
|\ | | | | | | | | a8345d65 ExternalProject: Add SOURCE_SUBDIR option
| * ExternalProject: Add SOURCE_SUBDIR optionMatthew Woehlke2016-08-161-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | Add a new SOURCE_SUBDIR option to ExternalProject_Add that allows specifying the location of the CMakeLists.txt to use as the project root relative to the SOURCE_DIR. This is helpful for projects that have unusual layouts, or projects that provide both a superbuild and project-only build depending on which CMakeLists.txt is used. Fixes: #15118
* | issues: update references to the CMake issue trackerBen Boeckel2016-08-151-1/+1
| | | | | | | | | | References to specific comments are left as-is since comments were not migrated.
* | prefer list(APPEND) over string(APPEND) where appropriateDaniel Pfeifer2016-08-081-1/+1
| |
* | Merge topic 'ExternalProject-no-DS_Store'Brad King2016-08-031-0/+1
|\ \ | | | | | | | | | | | | 52aecc0c ExternalProject: Ignore macOS .DS_Store files in tarball extraction
| * | ExternalProject: Ignore macOS .DS_Store files in tarball extractionBrad King2016-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not consider a top-level `.DS_Store` file when deciding whether a tarball contains exactly one directory whose contents should be used as the resulting top-level of the extraction. Fixes #16218. Suggested-by: Patrice Kouame
* | | Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-8/+8
|/ / | | | | | | | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* | ExternalProject: Add support for multiple alternative URLsLars Schmertmann2016-07-131-3/+16
| | | | | | | | | | | | | | Now it is possible to pass multiple URLs as a list that will be tried in and foreach(). So it will try next URL if the previous failed. Fixes #15749.
* | ExternalProject: Use default file name if extracting from URL failsRuslan Baratov2016-07-071-1/+6
| | | | | | | | | | | | The download/extract step uses the file name only internally so we can just use a fallback default name if one cannot be extracted from the URL.
* | ExternalProject: Match filenames in URLs with query strings and anchorsBrad King2016-07-051-7/+5
|/ | | | | | | While at it, refactor logic to consolidate the filename extraction and verification into a single match. Inspired-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
* ExternalProject: Fix git stash not using "--all" optionChristian Fetzer2016-05-211-0/+2
| | | | | | GIT_VERSION_STRING is unset in _ep_write_gitupdate_script(), hence git stash is not being called with the "--all" option, even if Git is new enough to support this.
* ExternalProject: Re-implement download logic as a dedicated scriptRuslan Baratov2016-05-191-42/+19
| | | | | | | | | | | | | | Move the content to a `ExternalProject-download.cmake.in` file and use `configure_file` to generate the final script. Retry logic was not working before because similar script trigger FATAL_ERROR if 'file(DOWNLOAD ...)' exits with nonzero 'status_code'. FATAL_ERROR makes the whole chain of commands stop and '_ep_write_verifyfile_script' retry logic was not used in fact. Default retry number set to 5 with pauses 0, 5, 5, 15, 60 seconds. Some space left for future improvements if needed (90, 300, 1200=20min). Can be controlled by user.
* ExternalProject: Re-implement download verification as a dedicated scriptRuslan Baratov2016-05-191-25/+18
| | | | | Move the content to a `ExternalProject-verify.cmake.in` file and use `configure_file` to generate the final script.
* ExternalProject: Avoid repeating download verificationRuslan Baratov2016-05-191-1/+2
| | | | Verify step for downloaded files will be performed in separate script.
* ExternalProject: Remove unused verify script logicRuslan Baratov2016-05-191-17/+2
| | | | The logic to re-run the download script will be moved elsewhere.
* ExternalProject: Remove unused 'retries' argument from verify scriptRuslan Baratov2016-05-191-4/+3
| | | | | There is no retries for local files and retry logic is broken for downloads. Will be implemented in '*-download.cmake' script.
* ExternalProject: Use uppercase placeholders for script generationRuslan Baratov2016-05-191-27/+27
| | | | Use uppercase variables for future 'configure_file' command.
* ExternalProject: Always run update step with non-empty UPDATE_COMMANDBrad King2016-05-181-0/+3
| | | | | | | | The purpose of the `update` step is to run an update on each build (subject to `UPDATE_DISCONNECTED`). This is done for version-controlled source directories. We should do it for a custom `UPDATE_COMMAND` too. In particular, when `UPDATE_DISCONNECTED` is used we expect the `skip-update` step to exist.
* ExternalProject: Initialize Git submodules recursively and on update (#16083)Ilya Kulakov2016-05-031-2/+2
|
* ExternalProject: Add option to perform a shallow Git clone (#15291)Brad King2016-04-271-3/+20
| | | | Inspired-by: Ilya Kulakov <kulakov.ilya@gmail.com>
* ExternalProject: Fix file download script with CMAKE_TLS_{VERIFY,CAINFO}Brad King2016-04-061-6/+9
| | | | | | | | Avoid generating incorrect code such as set(CMAKE_TLS_VERIFY set(CMAKE_TLS_VERIFY 1)) when one of these variables is set in the calling project.
* ExternalProject: Tell Git not to verify certs only if TLS_VERIFY is OFFBrad King2016-04-061-4/+7
| | | | | | | | | | | | Since commit 272779ce (ExternalProject: Allow TLS_VERIFY for git clones, 2016-04-01) we pass the `-c http.sslVerify=false` option to `git clone` even if no explicit `TLS_VERIFY` option was set. This changes behavior because we used to use the default Git behavior by default. Revise the logic to preserve the old default behavior by passing the new option only if `TLS_VERIFY` was explicitly passed as `OFF`. While at it, also honor `CMAKE_TLS_VERIFY` if the explicit `TLS_VERIFY` option is not given.