Commit Graph

257 Commits

Author SHA1 Message Date
Brad King
eb705b9531 Update links to gitlab.kitware.com repos to add -/
GitLab now uses a `/-/` component between the `group/project` part of
the URL and the `{issues,merge_requests,tree}` part so that it can
support `group/subgroup/project` with arbitrary depth.
2020-05-26 11:38:01 -04:00
Craig Scott
800e29ab8f Merge topic 'fetchcontent-externalproject-empty-args'
8dca6bd04b FetchContent: Preserve empty string arguments
cbf2daeed0 ExternalProject: Preserve empty string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4729
2020-05-25 17:20:48 -04:00
Craig Scott
cbf2daeed0 ExternalProject: Preserve empty string arguments 2020-05-23 23:41:53 +10:00
Craig Scott
0aea435aa1 ExternalProject: Provide choice of git update strategies
Fixes: #16528

Co-Authored-By: Michael Wake <macwake@gmail.com>
2020-05-23 22:27:38 +10:00
Craig Scott
ea410414c5 ExternalProject: factor out gitupdate step to separate file
The refactoring exposed that the original implementation
was referring to an undefined variable src_name, which was
previously only used in error messages. This has been fixed
as part of the refactoring work.

Fixes: #20336
2020-05-23 11:01:59 +10:00
Brad King
0d8aec412a Merge topic 'fix-cache-args-file-to-dep-list'
0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4710
2020-05-13 12:12:28 -04:00
Ben Boeckel
0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller
This is needed so that the caller can add a dependency on the cache
file.

Fixes: #20668
2020-05-12 10:34:23 -04:00
Vyacheslav Yurkov
e5b33871ed ExternalProject: Fix step dependency on mkdir step
When looking at `list(FIND)` result, zero index is ignored due to
incorrect error handling, and users can't set dependencies on mkdir
step.

Fixes: #20605
2020-04-20 18:49:17 +02:00
Craig Scott
7249ba9677 ExternalProject: Enforce that patch depends on update
Fixes: #17229
2020-04-03 22:48:44 +11:00
Brad King
e141c9dc15 Merge topic 'ExternalProject-no-extract-bool'
2c4bb705e8 ExternalProject: allow `DOWNLOAD_NO_EXTRACT OFF`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4562
2020-04-03 06:58:22 -04:00
Ben Boeckel
2c4bb705e8 ExternalProject: allow DOWNLOAD_NO_EXTRACT OFF
Fixes: #20531
2020-04-02 08:55:04 -04:00
Brad King
084c14d952 Merge topic 'doc-sections'
22aac6669b Help: install: use bullet lists to sort out target kinds
b3f4d50348 Help: ifw.rst: Add toc; mv "Hints" section -> subsection of "Variables"
c671966c20 Help: CPackComponent: Sectioning and rewording
05e56b1897 Help: FetchContent, ExternalProject: Command sections -> subsections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4367
2020-02-18 11:26:27 -05:00
Joachim Wuttke (o)
05e56b1897 Help: FetchContent, ExternalProject: Command sections -> subsections 2020-02-17 12:15:57 +01:00
Craig Scott
ef3194a6f8 ExternalProject: Quote each git --config option to handle spaces
Fixes: #20354
2020-02-15 13:23:56 +11:00
Charis Marangos
0ba8010255 ExternalProject: Fix git submodule recursion on update
In commit 5bc6230741 (ExternalProject: Option to turn off recursive
update of git submodules, 2019-10-16) we implemented the feature in the
clone script written by `_ep_write_gitclone_script` but not in the
update script written by `_ep_write_gitupdate_script`.  Implement the
latter by factoring out a common helper to use in both places.

Fixes: #20335
2020-02-11 10:14:42 +11:00
Ben Boeckel
46de38dae2 ExternalProject: replace LIST_SEPARATOR in initial cache files too 2019-11-20 09:21:46 -05:00
Johnny Jazeix
2d0100fac7 replace remove and remove_directory with rm in tests 2019-11-13 18:02:18 -05:00
Charis Marangos
5bc6230741 ExternalProject: Option to turn off recursive update of git submodules
Fixes: #19832
2019-10-24 13:36:19 -04:00
Ben Boeckel
5d3b825cbd ExternalProject: fix some documentation typos 2019-10-09 08:27:44 -04:00
Tetragramm
627fc5b44f ExternalProject: Avoid unnecessary checkout on clone
The clone step checks out the cloned branch but is always followed by an
explicit checkout of the desired `GIT_TAG`.  Tell `git clone` not to
check out.
2019-07-30 11:45:33 -04:00
Robert Maynard
d6be117ca0 ExternalProject: Support not initializing any submodules
Fixes #15592
2019-07-24 09:36:30 -04:00
Brad King
0793464d95 Merge topic 'ghs_custom'
2bae6a1346 GHS: Update tests and notes
3b415c60c1 GHS: Update ExternalProject for GHS tools
83c47ef5b8 GHS: Update project layout to accommodate gbuild inconsistencies
5d2e1404bd GHS: Update project layout to build targets correctly
b6bfa7eeb2 GHS: Support add_dependencies() command
39ee9718d9 GHS: Support add_custom_target() command
8d3dad9a76 GHS: Support add_custom_command( OUTPUT ) signature
37acc9e229 GHS: Update custom command build events

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Narendhar Manimohan <narendhar15@gmail.com>
Merge-request: !3119
2019-04-15 10:52:21 -04:00
Fred Baksik
3b415c60c1 GHS: Update ExternalProject for GHS tools
-- When using default values for the external project forward GHS platform
   variables so that the external project builds with the same tools as
   the original project.

-- Fix issue with bad top level project when GHS_PRIMARY_TARGET is set but has
   no value.  In this case treat it as unset and use default value.
2019-04-11 13:15:51 -04:00
Bartosz Kosiorek
cb33befe2d Modules: Update documentation formatting 2019-04-08 14:55:56 +02:00
Bartosz Kosiorek
8f723e48b8 ExternalProject: Optimize Mercurial commands 2019-03-19 15:17:55 +01:00
Bartosz Kosiorek
bca0c16223 ExternalProject: Optimize git commands 2019-03-19 15:17:35 +01:00
Bartosz Kosiorek
c58f5e116e ExternalProject: Extend documentation about GIT_TAG usage
When GIT_SHALLOW is used, the '--depth 1 --no-single-branch'
arguments are add. It means that only branch names and tags
is downloaded to repository. Most Commit Hash is not working.
With this commit the documentation was updated, to describe
the limitation of GIT_SHALLOW.
2019-03-15 11:00:31 -04:00
Bartosz Kosiorek
8355665f8d ExternalProject: Drop unnecessary 'git submodule init'
Since commit 79410eeb1f (ExternalProject: Initialize Git submodules
recursively and on update (#16083), 2016-04-26, v3.6.0-rc1~105^2) our
`git submodule update` step uses the `--init` flag.  This makes the
prior `git submodule init` unnecessary.
2019-03-14 13:45:35 -04:00
Bartosz Kosiorek
00b5f1a1b5 ExternalProject: Simplify generated 'git clone' scripts
Revise script generation to hard-code selected options instead of
building them with logic inside the script.
2019-03-14 13:44:30 -04:00
Bartosz Kosiorek
98e6822fdf ExternalProject: Re-run 'git clone' when GIT_REMOTE_NAME changes 2019-03-14 13:44:15 -04:00
Brad King
4cda0b66fa Merge topic 'ExternalProject-fix-log-in-custom-stamp'
a6d3fee77c ExternalProject: Restore default log dir with custom stamp dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3045
2019-03-01 09:08:15 -05:00
Brad King
a6d3fee77c ExternalProject: Restore default log dir with custom stamp dir
In commit b6f6cac378 (ExternalProject: add LOG_DIR option that allows
overriding of log location, 2018-10-12, v3.14.0-rc1~515^2~1) the log
directory got its own option.  The intention was to fall back to the
stamp directory by default.  However, the implementation actually only
falls back to the same default as the stamp directory and does not
consider a custom stamp dir.

Update the default log dir computation to fall back to whatever is the
final selection for the stamp dir.

Fixes: #19000
2019-03-01 07:54:17 -05:00
Craig Scott
f2072a6554 Help: Clarify ExternalProject_Add()'s LOG_MERGED_STDOUTERR behavior
The output is only merged for a step if it is logging to file. This
option is ignored for steps that are logging normally.

A minor grammatical error has also been fixed as part of this change.
2019-02-17 13:30:07 +11:00
Ben Boeckel
c09ec79981 ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE 2019-01-17 13:40:30 -05:00
Wouter Klouwen
19d86e26e3 ExternalProject: add LOG_OUTPUT_ON_FAILURE option
This option only has an effect if at least one of the other LOG_<step>
options is enabled.  If an error occurs for a step which has logging to
file enabled, that step's output will be printed to the console.  For
cases where a large amount of output is recorded, just the end of that
output may be printed to the console.
2018-12-21 07:52:08 +11:00
Wouter Klouwen
a4e9391953 ExternalProject: add LOG_PATCH option to log the patch command
Most steps support the logging into a file but the patch command is a
notable exception. This commit adds the LOG_PATCH options that acts as
the other LOG_* options.
2018-10-26 16:50:23 +01:00
Wouter Klouwen
7ddc9e353b ExternalProject: option LOG_MERGED_STDOUTERR to combine stdout and stderr
In some circumstances the user of ExternalProject may not desire the
split log files for stdout and stderr. In particular with a project has
many errors it can be difficult to correlate the output error with the
command that it resulted from.

This commit adds the LOG_MERGED_STDOUTERR option that when enabled
outputs into a unified <name>-<step>.log for each step. If disabled it
will default to the previous behaviour of <name>-<step>-out.log and
<name>-<step>-err.log.
2018-10-19 15:32:51 +01:00
Wouter Klouwen
b6f6cac378 ExternalProject: add LOG_DIR option that allows overriding of log location
In some situations it can be helpful to separate out the location of the
log files from the location of the stamp files. For instance if you have
a continuous integration that exposes the location where log files are
stored.

This commit adds an option that allows a user to override the default
behaviour of putting the log files in STAMP_DIR called LOG_DIR. The
previous behaviour of putting the log files into the STAMP_DIR applies
if LOG_DIR is not specified.
2018-10-19 15:32:51 +01:00
Joachim Wuttke (o)
fc7ee1ca45 Help: Override pygments CMakeLexer to support <..> and [..]
* The code snippets in the docs consist of CMake code mixed
  with syntax definition punctuation like < > [ ] ... Therefore
  a pure CMake lexer is inadequate. Here it is replaced by a
  CMake syntax definition parser.
* Fixed syntax definition snippets in FindPkgConfig.cmake to
  make best use of syntax highlighting. This source file is the
  hardest to support because it contains comparison operators
  <= = >=, which need special attention to avoid confusion
  with the placeholder indicators <...>.
* Fixed syntax in execute_process.rst (there were unbalanced
  brackets).
* Disabled syntax highlighting for long string examples in
  cmake-language.7.rst.
* No highlighting of removed syntax in CMP0049
* To inspect the outcome of this patch, see e.g. the pages
  * manual/cmake-buildsystem.7.html
  * module/ExternalProject.html
  * module/FindPkgConfig.html
  which are particularly rich in complex code snippets.
2018-10-19 07:25:34 +11:00
Jean-Christophe Fillion-Robin
df1ddeec12 ExternalProject: Report error if local variables are not defined
Since in some situations, ExternalProject module may be included in
a sub-directory, functions will be available in the global scope but
local variables like "_ep_keywords_<keyword>" will not be defined, this
commit checks and reports an error indicating that the ExternalProject
module must be explicitly included before using any of the ExternalProject_*
functions  that require the module's inclusion within the current scope
or above.

Co-authored-by: Pablo Hernandez <pablo.hernandez@kitware.com>
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2018-09-06 23:02:24 +10:00
Brad King
21b7e14800 Merge topic 'ep-support-passing-var-ending-with-notfound'
7ad5165c67 ExternalProject: Fix cache generation when args end with "-NOTFOUND"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2127
2018-06-05 11:23:49 -04:00
Matt McCormick
470ff56e5a ExternalProject: Improve URL_HASH argument description
The previous documentation suggested

  ALGO=MD5=d7a3dc7757a35df3dbb890f7dee0976b

for example.
2018-06-04 16:17:58 -04:00
Jean-Christophe Fillion-Robin
7ad5165c67 ExternalProject: Fix cache generation when args end with "-NOTFOUND"
Generalize the fix in commit v3.11.0-rc4~8^2 (ExternalProject: Fix cache
generation when last args ends with "-NOTFOUND", 2018-03-10) to work for
any argument rather than just the last one.

ExternalProject can now successfully generate the cache file when any
(not only the last one) cache variable associated with either
`CMAKE_CACHE_ARGS` or `CMAKE_DEFAULT_CACHE_ARGS` configure step option
is set to a `<value>` ending with `-NOTFOUND`.
2018-06-04 11:37:52 -04:00
Jean-Christophe Fillion-Robin
7ad981c8f7 ExternalProject: Fix cache generation when last args ends with "-NOTFOUND" 2018-03-12 13:45:50 -04:00
Brad King
f7f34a46e6 Merge topic 'use_generator_is_multi_config'
3c413e2a GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules
c267ea1c GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1627
2018-01-08 11:14:16 -05:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Craig Scott
3c413e2a31 GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules 2017-12-30 09:35:56 +11:00
Craig Scott
b8b8748977 ExternalProject: Support substituting <DOWNLOAD_DIR> 2017-12-07 07:22:02 +11:00
Brad King
6b3cd64d42 ExternalProject: Propagate the generator instance
When the `CMAKE_GENERATOR` option is given to `ExternalProject_Add`,
look also for option `CMAKE_GENERATOR_INSTANCE` 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_INSTANCE` (since we
already use its CMAKE_GENERATOR).
2017-10-19 10:20:11 -04:00
Brad King
358ceee5d8 Merge topic 'curl_netrc_options'
d45aa38a Add dev notes for topic 'curl_netrc_options'
60c272b6 ExternalProject: Add support for NETRC and NETRC_FILE suboption
754e39dd Add testcases for file(DOWNLOAD|UPLOAD) netrc options
5d67e902 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1376
2017-10-19 09:27:43 -04:00