summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)Rolf Eike Beer2014-04-141-5/+4
| | | | | | | | | | | | The matches have already been calculated and can simply be taken from CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very similar regular expressions.
* | ExternalProject: Find VCS packages quietlyDaniele E. Domenichelli2014-04-041-4/+4
| | | | | | | | | | This keeps the VCS packages out from FeatureSummary output, unless the INCLUDE_QUIET_PACKAGES is used.
* | ExternalProject: Add EXCLUDE_FROM_ALL option to ExternalProject_AddDaniele E. Domenichelli2014-04-011-0/+10
| | | | | | | | | | | | | | | | | | | | When adding a new external project, the "all" target will depend on this. This option allows one to add an external project will not be executed when the "all" target is executed. The reason for this is that an external project could be useful, for example, only for running tests, and therefore not necessary during the build.
* | ExternalProject: Add EXCLUDE_FROM_MAIN option to ExternalProject_Add_StepDaniele E. Domenichelli2014-04-011-5/+9
| | | | | | | | | | | | | | When adding a new step using ExternalProject_Add_Step, the main target will depend on this step. This option allows one to add a step that will not be executed when the main target for the external project is executed.
* | ExternalProject: Improve handling of git remote branchesDaniele E. Domenichelli2014-04-011-7/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ExternalProject handles git remote branches by commit hash. Due to this, the git repository ends in detached states, and local commits are discarded. Use "git rebase" for remote branches instead of "git checkout". If there are uncommitted changes, use "git stash save/pop" to save changes and restore them after the rebase. If any of these operations fails, try to restore the original status and exit with a fatal error, asking the user to resolve the conflicts manually. This also makes the behaviour of ExternalProject using git more similar to the svn version, and probably more likely to what the user expects by setting GIT_TAG to a branch.
* | ExternalProject: Strip trailing space from git hashDaniele E. Domenichelli2014-04-011-0/+2
| |
* | ExternalProject: Add option to disable download progress (#14807)Brad King2014-03-171-3/+11
| | | | | | | | | | Add a DOWNLOAD_NO_PROGRESS option to disable progress reports while downloading source tarballs.
* | ExternalProject: Add option to always run the build stepBrad King2014-02-211-0/+9
|/ | | | | | | Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using the build step stamp file and execute the step on every build. Extend the BuildDepends test with a case to cover this option.
* ExternalProject: Add option GIT_SUBMODULESGereon Kremer2014-01-281-6/+9
| | | | | This option allows to filter the submodules that are checked out. Add a simple testcase for GIT_SUBMODULES option passing an empty list.
* ExternalProject: Reattempt download when verification fails.Matt McCormick2014-01-151-7/+27
| | | | | | | | | When downloading an URL with ExternalProject, reattempt the download three times if the file hash verification fails. The re-attempt is limited to non-local URL's. The same download CMake script is re-used after removing any file that resulted from the previous download attempt. Up to three re-attempts are performed.
* ExternalProject: Format module documentationBrad King2013-11-191-70/+59
| | | | | | | | Manually revise the .rst format of the documentation. Use inline literal quotes appropriately in paragraph text. Move the :: literal block openers to the end of the preceding paragraphs. Convert the command signature documentation and examples to cmake code-block directives.
* Help: Fix reStructuredText syntax in auto-generated documentsBrad King2013-10-151-1/+1
|
* ExternalProject: Restore documentation indentation levelBrad King2013-10-151-70/+70
| | | | | This module parses its own documentation to extract supported options. Fix the indentation level to match that expected by the parser.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-135/+164
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* Merge topic 'vs-no-indirect-output'Brad King2013-07-161-2/+1
|\ | | | | | | | | 45d2966 VS: Avoid leaking child process output back to IDE (#14266)
| * VS: Avoid leaking child process output back to IDE (#14266)Brad King2013-07-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The VS IDE sets the environment variable VS_UNICODE_OUTPUT when executing build rules in order to tell MS tools to report output through a back door instead of through stdout/stderr. Unset this variable so that CMake can capture or properly redirect all output from processes it runs even when running inside a VS IDE build environment. This generalizes the special cases fixed by commit 80d045b0 (When GetPrerequisites.cmake runs dumpbin while running inside the VS IDE..., 2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through output when logging, 2011-01-06), so drop special handling of VS_UNICODE_OUTPUT in those instances.
* | ExternalProject: Document multiple COMMAND linesBrad King2013-07-081-0/+9
|/ | | | | | | We support multiple commands per external project step by using the COMMAND keyword. Document this behavior and show an example. While at it, document that shell operators and current working directory behavior is not defined.