summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Merge topic 'cmp0054-warnings-extproj'Brad King2014-12-151-2/+2
|\ | | | | | | | | a300d0ff ExternalProject: avoid CMP0054 warnings
| * ExternalProject: avoid CMP0054 warningsBen Boeckel2014-12-121-2/+2
| | | | | | | | Found where ${command} is "make" which is a local variable.
* | ExternalProject: remove extra newlines from log messagesBen Boeckel2014-12-121-2/+2
|/ | | | message() already adds a newline.
* ExternalProject: Add TEST_EXCLUDE_FROM_MAIN optionDaniele E. Domenichelli2014-12-051-4/+21
| | | | | | | | | | | If this option is enabled, the test step is created with the EXCLUDE_FROM_MAIN option, and if TEST_BEFORE_INSTALL is enabled, the install step does not depend on the test step. This means that the test step is never executed, unless the test target is explicitly created by calling ExternalProject_Add_StepTarget, or by passing it with the STEP_TARGETS option, or with the EP_STEP_TARGETS directory property.
* ExternalProject: Add options to specify BYPRODUCTS (#14963)Brad King2014-11-171-0/+13
| | | | | | | The external project's build process may generate byproducts on which other rules in the driving project's build later depend. Provide a way for the driving project to specify what byproducts it expects to be made available by the custom commands that drive the external project.
* Merge topic 'ExternalProject_UPDATE_DISCONNECTED'Brad King2014-11-131-1/+63
|\ | | | | | | | | | | | | | | 3c497f11 Help: Add notes for topic 'ExternalProject_UPDATE_DISCONNECTED' aba5cec6 ExternalProject: Add unit tests for UPDATE_DISCONNECTED 3f606fa7 ExternalProject: Add UPDATE_DISCONNECTED option c0b749cf ExternalProject: Always add a command to a step
| * ExternalProject: Add UPDATE_DISCONNECTED optionDaniele E. Domenichelli2014-11-061-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | If UPDATE_DISCONNECTED is set, the update step is not executed automatically when building the main target. The update step can still be added as a step target and called manually. This is useful if you want to allow to build the project when you are disconnected from the network (you might still need the network for the download step). This is disabled by default. The directory property EP_UPDATE_DISCONNECTED can be used to change the default value for all the external projects in the current directory and its subdirectories.
| * ExternalProject: Always add a command to a stepDaniele E. Domenichelli2014-11-061-0/+9
| | | | | | | | | | | | | | | | Some generators (i.e. Xcode) will not generate a file level target if no command is set, and therefore the dependencies on this target will be broken. This patch sets an empty echo command that does nothing to avoid this issue.
* | Merge topic 'ExternalProject-check-hash-before-download'Brad King2014-11-111-1/+14
|\ \ | |/ |/| | | | | ee7405a6 ExternalProject: Restore logic to not download already-existing file
| * ExternalProject: Restore logic to not download already-existing fileBrad King2014-11-101-1/+14
| | | | | | | | | | | | | | | | | | | | The change in commit v3.1.0-rc1~85^2 (ExternalProject: Fix download retry logic, 2014-09-13) dropped the file(DOWNLOAD) EXPECTED_HASH argument. This prevents file(DOWNLOAD) from skipping the download if the output file already exists with the proper hash. Restore this check with explicit code in the download script. Reported-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
* | ExternalProject: Add ExternalProject_Add_StepDependencies functionDaniele E. Domenichelli2014-11-031-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject_Add_StepDependencies function add some dependencies for some external project step. The syntax is: ExternalProject_Add_Step_Dependencies(<name> <step> [target1 [target2 [...]]]) This function takes care to set both target and file level dependencies, and will ensure that parallel builds will not break. It should be used instead of add_dependencies() when adding a dependency for some of the step targets generated by ExternalProject. See also: http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8680/focus=8926
* | ExternalProject: Add independent step targetsDaniele E. Domenichelli2014-11-031-15/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding step targets using ExternalProject_Add_StepTargets, the STEP_TARGETS argument or the EP_STEP_TARGETS property, ExternalProject sets all the dependencies for the main project to that target. Due to this, the update target cannot be used without downloading and building all the dependencies. In order to be able to add step targets that do not depend on other external projects, this patch adds: * An optional "NO_DEPENDS" argument to the ExternalProject_Add_StepTargets function. If this argument is set, then no dependencies are set for the target (file dependencies will still be set). * A new argument INDEPENDENT_STEP_TARGETS to the ExternalProject_Add function and a new directory property EP_INDEPENDENT_STEP_TARGETS that behave like STEP_TARGETS and EP_STEP_TARGETS, but cause the ExternalProject_Add_StepTargets to be called with the NO_DEPENDS argument.
* | ExternalProject: Add CMAKE_CACHE_DEFAULT_ARGS argumentsDaniele E. Domenichelli2014-10-311-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | This argument allows to set default arguments that are written in the initial cache file, but that are not forced, and therefore allows the user to change these values later (CMAKE_ARGS and CMAKE_CACHE_ARGS always overwrite the values). Also add some documentation to explain the differences between these 3 arguments. Extend ExternalProjectLocal test to cover CMAKE_CACHE_DEFAULT_ARGS.
* | ExternalProject: Use explicit markup and definition lists in docsBrad King2014-10-281-139/+227
| | | | | | | | | | | | | | | | Convert ExternalProject module documentation to use explicit markup blocks for each command. Enumerate command options with definition lists instead of a literal block. This will allow more detail to be added later. Also fix the logic that parses options out of the documentation to be aware of the new layout.
* | ExternalProject: Convert docs to a bracket commentBrad King2014-10-281-187/+188
|/ | | | | | | Use a bracket comment to hold the documentation instead of a block of line comments. This will make further updates easier. Also fix the logic that parses options out of the documentation to be aware of the new layout.
* Merge topic 'cleanup-CMP0054'Brad King2014-09-221-1/+1
|\ | | | | | | | | | | | | fa7d47ac Tests: Fix CMP0054 warnings 3b5ea54a CheckPrototypeDefinition: Avoid if() auto-dereference c9b301cd ExternalProject: Fix CMP0054 warning in _ep_parse_arguments
| * ExternalProject: Fix CMP0054 warning in _ep_parse_argumentsMatt McCormick2014-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the CMP0054 warning: CMake Warning (dev) at .../Modules/ExternalProject.cmake:242 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted keywords like "COMMAND" will no longer be interpreted as keywords when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): .../Modules/ExternalProject.cmake:1938 (_ep_parse_arguments) CMakeLists.txt:5 (ExternalProject_Add) by avoiding a reference to "${key}" or "COMMAND" in quotes.
* | Merge topic 'ExternalProject-retry'Brad King2014-09-221-6/+0
|\ \ | |/ |/| | | | | 30a94eec ExternalProject: Fix download retry logic
| * ExternalProject: Fix download retry logicRuslan Baratov2014-09-151-6/+0
| | | | | | | | | | | | | | Do not check file's hash in download script. If hash will not match command ``file(DOWNLOAD ...)`` will fail with FATAL_ERROR, ``cmake -P`` will exit with unsuccessful code, and the build will stop. Leave hash checking to the existing implementation in the verify step.
* | Merge topic 'vs-generator-platform'Brad King2014-09-151-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | be6a555d Tests: Test setting a generator platform in a toolchain file d506fee8 Tests: Use -A option to pass generator platform selection 11c9ddd6 ExternalProject: Use -A option to pass generator platform 29bd843e CTest: Use -A option to pass generator platform selection eb7d8156 cmake: Add -A option to specify a generator platform
| * ExternalProject: Use -A option to pass generator platformBrad King2014-09-151-2/+2
| | | | | | | | This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
* | Merge topic 'vs-generator-platform'Brad King2014-09-101-0/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 09c8ad99 enable_language: Initialize system-specific generator info only once 09ab207c Tests: Add generator platform support 6944997b ExternalProject: Propagate the generator platform 8d332091 CTest: Add options to set generator platform b97736a2 VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8 0f1f1271 CMake: Add CMAKE_GENERATOR_PLATFORM option 4f7d0c42 Help: Document CMAKE_VS_PLATFORM_NAME variable 68d4280a VS: Refactor internal default platform name selection ad2a4776 cmGlobalVisualStudio10Generator: Re-order some methods 03b7b6cd cmGlobalGenerator: Call SetGeneratorToolset even for empty toolset
| * ExternalProject: Propagate the generator platformBrad King2014-09-051-0/+11
| | | | | | | | | | | | | | | | When the CMAKE_GENERATOR option is given to ExternalProject_Add, look also for option CMAKE_GENERATOR_PLATFORM to pass on to cmake as a cache definition. When no CMAKE_GENERATOR option is given explicitly then use the current project's CMAKE_GENERATOR_PLATFORM (since we already use its CMAKE_GENERATOR).
* | Merge topic 'ExternalProject-download-loop'Brad King2014-09-091-0/+1
|\ \ | |/ |/| | | | | 9f49ac3d ExternalProject: Avoid infinite loop on file download hash mismatch
| * ExternalProject: Avoid infinite loop on file download hash mismatchAlan W. Irwin2014-09-081-0/+1
| | | | | | | | | | | | When the loop was added by commit v3.0.0-rc1~103^2~3 (ExternalProject: Reattempt download when verification fails, 2015-01-15), we forgot to actually increment the loop counter. Add the increment line.
* | ExternalProject: Clarify SVN_REVISION format in docs (#15081)Brad King2014-08-131-1/+1
| | | | | | | | Show the explicit '-r' that is required.
* | ExternalProject: Recognize lzma-compressed files (#13515)Brad King2014-07-291-5/+5
| | | | | | | | | | | | | | Add .7z, .tar.xz, and .txz file extensions. Inspired-by: Joke de Buhr <joke@seiken.de> Inspired-by: David Cole <DLRdave@aol.com>
* | ExternalProject: Recognize .tbz2 extensionBrad King2014-07-291-5/+5
| | | | | | | | | | | | | | | | Also fix .bz2 extension to be .tar.bz2 since we only support compressed tarballs and not plain compressed files. Suggested-by: Nils Gladitz <nilsgladitz@gmail.com> Suggested-by: Rolf Eike Beer <eike@sf-mail.de>
* | ExternalProject: Set FOLDER property to targetsDaniele E. Domenichelli2014-05-051-0/+3
| | | | | | | | This is useful when using the USE_FOLDERS global property
* | ExternalProject: Set LABELS property to targetsDaniele E. Domenichelli2014-05-051-0/+2
| | | | | | | | This is useful for using CDash subprojects.
* | Merge topic 'ExternalProject-verify-cmake-var'Brad King2014-05-011-1/+1
|\ \ | |/ | | | | | | 420280f3 ExternalProject: Fix path to cmake in verify script
| * ExternalProject: Fix path to cmake in verify scriptBrad King2014-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | In commit v3.0.0-rc1~103^2~3 (ExternalProject: Reattempt download when verification fails, 2014-01-15) a reference to ${CMAKE_COMMAND} was added to generate a reference to the CMake command in a cmake script. Escape the '$' so that the literal variable reference appears in the script instead of writing the path to the current cmake. This is necessary when the path to CMake contains spaces or other characters special to CMake syntax.