summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* ExternalProject: Allow TLS_VERIFY for git clonesSamir Benmendil2016-04-011-6/+17
| | | | | Use the git config `http.sslVerify=false` to disable strict ssl for git commands.
* Merge topic 'fix-spelling-typos'Brad King2016-03-311-3/+3
|\ | | | | | | | | 49e82c15 Fix spelling typos in comments and documentation (#16037)
| * Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-3/+3
| | | | | | | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* | ExternalProject: add support for just downloading a fileBen Boeckel2016-03-311-6/+26
|/ | | | | | Some projects only ship self-extracting installers rather than compressed archives. Add a flag so that these files may be used in ExternalProject.
* ExternalProject: Be compatible with projects setting CMAKE_CFG_INTDIRBrad King2016-02-051-2/+17
| | | | | | | | | | | | | | Since commit v3.5.0-rc1~32^2~1 (ExternalProject: Simplify `cmake --build` configuration passing, 2016-01-19) we use the `$<CONFIG>` generator expression to generate the `cmake --build . --config <config>` value for the default BUILD_COMMAND instead of the CMAKE_CFG_INTDIR placeholder value provided by multi-config generators. However, some projects have been abusing the old implementation detail by setting CMAKE_CFG_INTDIR themselves to get a specific configuration. Those projects should be updated to set their own BUILD_COMMAND to get non-default behavior. Meanwhile we can be compatible with their existing releases by detecting when CMAKE_CFG_INTDIR is not a generator-provided placeholder and using its value instead.
* ExternalProject: Fix TEST_BEFORE_INSTALL for multi-config generatorsBrad King2016-01-201-0/+3
| | | | | | | In multi-config generators we must tell `ctest` what configuration to test. Reported-by: Taylor Braun-Jones <taylor@braun-jones.org>
* ExternalProject: Simplify `cmake --build` configuration passingBrad King2016-01-201-3/+3
| | | | | | Check CMAKE_CONFIGURATION_TYPES instead of CMAKE_CFG_INTDIR in order to recognize multi-config generators. Then use $<CONFIG> to pass the configuration value.
* ExternalProject: Add option to set `git clone -o` argumentAdam Rankin2016-01-151-6/+17
| | | | | | | | Add a `GIT_REMOTE_NAME` option to `ExternalProject_Add` to support git clone --origin <name> Default to `origin` if not specified.
* ExternalProject: Always use CMake builtin FindGit (#15791)Brad King2015-10-151-0/+1
| | | | | | | | Unset CMAKE_MODULE_PATH before calling find_package(Git) to ensure we do not get a project-provided FindGit module that may not provide the GIT_VERSION_STRING that we need. We do not need to restore the value explicitly because this occurs inside the _ep_add_download_command function call scope.
* ExternalProject: Fix Git version report in error message (#15791)Brad King2015-10-151-1/+1
| | | | | | Refactoring in commit v3.4.0-rc1~77^2~1 (ExternalProject: Use GIT_VERSION_STRING instead of custom method, 2015-09-17) forgot to update the variable name used in an error message.
* ExternalProject: Use "git stash save --all" only if supported (#15722)Daniele E. Domenichelli2015-09-171-1/+6
| | | | The --all option for git-stash wasn't introduced until git version 1.7.6.
* ExternalProject: Use GIT_VERSION_STRING instead of custom methodDaniele E. Domenichelli2015-09-171-16/+1
| | | | GIT_VERSION_STRING is available in FindGit.cmake since CMake version 2.8.8
* ExternalProject: Tell "hg clone" not to implicitly updateA. Joël Lamotte2015-08-111-1/+1
| | | | | | | | | | | | | | | By default Mercurial command "clone" will implicitly call "update" with the "default" branch after downloading the cloned repository. However ExternalProject_Add() always generates a second "update" command after cloning with a tag which is either specified or "tip" (equivalent to "default" by default). Therefore ExternalProject will first clone then update to default branch then update to another specified branch if provided. This leads to potentially very long clone operation (in particular when the repository default branch contain subrepos) which can lead to transaction abort triggered by the server. Simply use "hg clone -U" to avoid the implicit update during clone. Our following call to "hg update" will take care of updating anyway.
* ExternalProject: Avoid if() auto-dereference of a "TEST" variableMatt McCormick2015-08-031-3/+3
| | | | Exposed by CMP0054 warnings.
* ExternalProject: Added new USES_TERMINAL optionsJames Johnston2015-07-061-0/+83
| | | | | | | | | | | | | | | | | | Added new USES_TERMINAL option to the ExternalProject_Add_Step function. This option passes USES_TERMINAL to the underlying add_custom_command call so that the Ninja console pool is used. Also, corresponding new USES_TERMINAL_<step> options were added to the ExternalProject_Add function. Justification: if using Ninja with a CMake superbuild, it's often desirable to limit the superbuild to ONE sub-Ninja process at a time to avoid oversubscribing the CPU. Using the console pool also makes it easy to monitor the progress of the sub-Ninja process. Independent USES_TERMINAL_<step> arguments are passed to ExternalProject_Add instead of one USES_TERMINAL argument that controls everything. Users may wish to run some steps in parallel but not others (e.g. parallelize configure but not build).
* ExternalProject: Initialize only selected git submodules (#15590)Silvio Traversaro2015-06-021-1/+1
| | | | | | | | | | | Honor the GIT_SUBMODULES option added by commit v3.0.0-rc1~92^2 (ExternalProject: Add option GIT_SUBMODULES, 2014-01-09) during the 'git submodule init' step to avoid initalizing all modules since we are only going to update the specified subset anyway. This will be useful for project repositories that have many submodules (e.g. https://github.com/boostorg/boost). Reviewed-by: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
* ExternalProject: Fix log when the first arg of commands is "COMMAND" (#15567)Daniele E. Domenichelli2015-05-201-2/+4
|
* ExternalProject: Improve error when SOURCE_DIR is missing (#15560)Brad King2015-05-081-1/+12
| | | | | Mention the SOURCE_DIR that we checked and found empty or missing so that the user can see the full path to what we expected to find.
* ExternalProject: Allow dependencies on INTERFACE librariesBrad King2015-04-221-4/+16
| | | | | Respect INTERFACE library property whitelist. Check that a target has type "UTILITY" before querying other properties.
* ExternalProject: Fix error message typoBrad King2015-04-211-1/+1
|
* ExternalProject: Allow generator expressions with LOG_* options (#15287)Andrey Pokrovskiy2015-04-211-4/+10
| | | | | | Use file(GENERATE) to write the logging wrapper scripts to evaluate generator expressions. Use a per-config script names in case the content varies by configuration.
* ExternalProject: Allow generator expressions in initial cache optionsAndrey Pokrovskiy2015-04-211-5/+6
| | | | | | Use file(GENERATE) to write the initial cache file so that we can evaluate generator expressions. Use a per-config initial cache file name in case the content varies by configuration.
* ExternalProject: fix the build command for generator overridesBen Boeckel2015-03-261-1/+4
| | | | | | The `binary_dir` variable is never set, so this is invalid. Instead, use "." which all the other build commands use anyways. Also only set the --config option if it is meaningful.
* ExternalProject: Replace placeholder tokens in BYPRODUCTSGaëtan Lehmann2015-03-091-3/+3
| | | | | | This allows the developer to specify the byproducts relative to the binary directory without the need to set the binary directory location explicitly.
* Modules: Check for ARGC before using ARGV#Daniele E. Domenichelli2015-02-271-1/+1
| | | | ARGV# could be defined from a parent scope.
* ExternalProject: Allow ALWAYS step property to be switched (#15368)Brad King2015-01-231-0/+9
| | | | | | | Within an existing build tree, if the stamp for a step already exists when one activates the ALWAYS option, we still want it to always build. Remove the step stamp file during CMake configuration to ensure it does not exist when the ALWAYS option is enabled.