summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* 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.
* ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128)Matt McCormick2013-05-061-4/+4
| | | | | | | | | | With SVN_USERNAME "" SVN_PASSWORD "" in an ExternalProject_Add() call, the blank username and password will be passed to the svn checkout/update step commands.
* ExternalProject: Retry on a failed git cloneBill Hoffman2013-03-261-5/+15
| | | | | Git sometimes fails to clone repositories due to network outage or server load. Try 3 times before giving up.
* Merge branch 'master' into generator-toolsetBrad King2013-02-071-2/+5
|\ | | | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * ExternalProject: Allow DEPENDS on normal targets (#13849)Brad King2013-01-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject_Add DEPENDS option adds two types of dependencies. It adds a target-level build order dependency between the external project target and the named targets. It also adds a file-level dependency on the "done" stamp file of the named external project targets. Targets not created by ExternalProject_Add have no such stamp file and no _EP_STAMP_DIR property. Prior to commit d14c0243 (Refactor repeated code into function, 2012-04-26) we unconditionally accepted an empty stamp dir and generated a dependency on a non-existent file. After that commit we generate an error that no stamp dir is set. Skip the file-level dependency when the named dependency is not an external project target in order to allow this use case. Teach the ExternalProject test to cover the case.
* | ExternalProject: Propagate the generator toolsetBrad King2013-02-071-0/+11
| | | | | | | | | | | | | | | | When the CMAKE_GENERATOR option is given to ExternalProject_Add, look also for option CMAKE_GENERATOR_TOOLSET to select the value of the cmake "-T" command-line flag. When no CMAKE_GENERATOR option is given explicitly then use the current project's CMAKE_GENERATOR_TOOLSET (since we already use its CMAKE_GENERATOR).
* | ExternalProject: Simplify CMake command line generationBrad King2013-01-311-4/+5
|/ | | | | Append the source directory to the command line option in a separate step instead of duplicating it with each possible generator.
* ExternalProject: Always do a git fetch for a remote ref.Matt McCormick2012-11-131-1/+14
| | | | | Remote git refs always require a git fetch, because the remote may move around where the ref points.
* ExternalProject: Only run 'git fetch' when required.Matt McCormick2012-11-031-5/+65
| | | | | | | | | | | In the current default update step for Git under the ExternalProject_Add command, a 'git fetch' is always performed, followed by a 'git checkout' and 'git submodule update --recursive'. However, a 'git fetch' can be time consuming and requires a network connection. To save time, we look at the current checked out hash, and only perform the fetch if required. This is performed in a CMake script so we can handle the conditional logic in a cross platform manner.
* Merge topic 'file-DOWNLOAD-EXPECTED_HASH'David Cole2012-09-251-1/+1
|\ | | | | | | | | 95a0011 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
| * file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=valueBrad King2012-09-191-1/+1
| | | | | | | | | | | | Make the EXPECTED_HASH option take only a single value instead of two to avoid handling sub-keyword arguments. This is also consistent with URL_HASH in ExternalProject.
* | Merge topic 'ExternalProject-DOWNLOAD_NAME'Brad King2012-09-191-1/+5
|\ \ | |/ |/| | | | | 8da0fe4 ExternalProject: Add DOWNLOAD_NAME option
| * ExternalProject: Add DOWNLOAD_NAME optionBrad King2012-09-181-1/+5
| | | | | | | | | | | | | | Some download URLs do not have the filename embedded in the url. Add an interface to specify the local filename explicitly. Suggested-by: James Goppert <james.goppert@gmail.com>
* | Rename SSL terminology to TLSBrad King2012-09-141-20/+20
| | | | | | | | | | | | TLS has superseded SSL so rename the recently added file(DOWNLOAD) and ExternalProject options using the newer terminology. Drop "CURLOPT" from names because curl is an implementation detail.
* | Add SSL_VERIFYPEER and CAINFO file options to ExternalProject_Add.Bill Hoffman2012-09-121-2/+31
| | | | | | | | | | | | | | | | | | | | This commit adds the ability to turn on and off ssl certificate authority checking. It also adds the ability to specify a certificate authority information file. This can be done by setting global cmake variables CMAKE_CURLOPT_CAINFO_FILE and or CMAKE_CURLOPT_SSL_VERIFYPEER in the project calling ExternalProject_Add, or by passing those options to individual ExternalProject_Add calls.
* | ExternalProject: Generalize URL_MD5 option to URL_HASHBrad King2012-09-111-49/+47
|/ | | | Add support for SHA algorithms.
* ExternalProject: Add Mercurial (hg) repository supportBrad King2012-08-161-1/+127
| | | | | | | Add options HG_REPOSITORY and HG_TAG to specify an external project hosted in a Mercurial repository. Teach ExternalProject to clone the repository and update from it. Extend the ExternalProject test to try a Mercurial repository when hg is available.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-27/+27
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* ExternalProject: Fix 'make' builds with Ninja (#13159)Matt McCormick2012-05-211-2/+6
| | | | | | Fix the build command when Ninja is the CMake Generator, but the external project is created for a project that does not use CMake but does use "make".
* ExternalProject: Avoid repeated git clone operations (#12564)David Cole2012-04-281-1/+26
| | | | | | | By tracking a stamp file within the git clone script itself. Avoids a 2nd git clone operation after switching from Debug to Release builds in Visual Studio, or vice-versa.
* ExternalProject: Refactor repeated code into function (#12564)David Cole2012-04-281-27/+39
| | | | | | | | Add "private/internal-use-only" function _ep_get_step_stampfile to get the name of the stamp file for a given step. The functionality provided by this commit should be identical to its parent commit.
* ExternalProject: Avoid unnecessary git clones (#12564)David Cole2012-04-251-1/+7
| | | | | | | | | | | | | In the case of git, only track the repository in the repository info dependency tracking file. Not the tag. The download step should only re-run if the repository changes. The download step should NOT re-run if the tag changes. The update step is an 'always' re-running step, and so should already re-run, unless it's been eliminated by use of UPDATE_COMMAND ""
* ExternalProject: Add missing COMMAND keywordDavid Cole2012-04-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | Commit f67139ae added running a verify script in between running the download and extract scripts. Since then, it has always been missing the COMMAND keyword added in this commit. It worked anyway (semi-accidentally) by running a command line like: cmake -P script1.cmake cmake -P script2.cmake CMake, when running -P scripts on the command line, runs them in order, and apparently ignores spurious arguments in between (the middle "cmake" in the above example) and so, all appeared to work as intended. This commit adds the missing keyword and the commands that run are now two separate sequential cmake invocations like: cmake -P script1.cmake cmake -P script2.cmake ...which was the original intent of commit f67139ae
* Ninja: Add the Ninja generatorPeter Collingbourne2012-02-021-2/+17
|
* ExternalProject: Update copyright yearBrad King2012-01-101-1/+1
|
* ExternalProject: Fix git.cmd version detectionBrad King2012-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When GIT_EXECUTABLE points at ".../Git/cmd/git.cmd" in an msysGit installation we previously failed to detect the version number in a subtle case. The "git.cmd" assumes 'chcp' is in PATH. It is typically available at "C:\Windows\System32\chcp.com". On 64-bit Windows the File System Redirector maps this location to "C:\Windows\SysWOW64\chcp.com" for 32-bit processes. However, some Windows installations fail to provide chcp.com at this path. Whenever git.cmd runs in a 32-bit command shell, as it does under a 32-bit CMake binary, it reports 'chcp' is not recognized as an internal or external command, operable program or batch file. on stderr. Capture stderr separately so it does not affect parsing of the version number. See also msysGit issue 358: http://code.google.com/p/msysgit/issues/detail?id=358 Note that FindGit prefers "git.cmd" over "git.exe" because it sets up the proper HOME environment variable necessary for Git ssh connections to work the same as they do from the Git bash prompt.