Commit Graph

859 Commits

Author SHA1 Message Date
Brad King
d6ee9b4a43 Merge topic 'build-interface-targets'
bafa9fe887 fileapi: Add INTERFACE libraries with SOURCES to codemodel-v2
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
afb998704e Remove filtering of allowed INTERFACE library properties
e7edba2baf Makefiles: Use IsInBuildSystem in global generator target type checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5078
2020-08-10 11:38:59 -04:00
Brad King
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem.  In practice, this has become limiting:

* Header-only libraries do have sources, they just do not compile.
  Developers should be able to edit those sources (the header files)
  in their IDE.

* Header-only libraries may need to generate some of their header
  files via custom commands.

Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.

Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.

Fixes: #19145
2020-08-07 08:46:32 -04:00
Brad King
1f1feb72f8 Help: Document in add_library that IMPORTED_IMPLIB is for DLL import libs
Fixes: #21053
2020-08-04 09:29:42 -04:00
Craig Scott
bda967bcb9 Merge topic 'doc-add_library-updates'
ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets
99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
716e76be3e Help: Re-order add_library sections
1b0adeea81 Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5086
2020-08-01 19:59:55 -04:00
Brad King
ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets 2020-07-31 12:04:17 -04:00
Brad King
99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
Move documentation on IMPORTED INTERFACE libraries to the main section
on Imported Libraries.  Revise the section to clarify the different
kinds of imported libraries that can be created and what properties they
need.

Issue: #18975
2020-07-31 11:40:15 -04:00
Brad King
716e76be3e Help: Re-order add_library sections
Put all the sections that create in-project targets first,
and move Imported Libraries and Alias Libraries at the end.
2020-07-31 11:22:28 -04:00
Brad King
1b0adeea81 Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopes 2020-07-31 10:32:59 -04:00
Craig Scott
22bfe014d0 Merge topic 'file-download-no-save'
fed7d8f76d file(DOWNLOAD): Make file argument optional

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5060
2020-07-28 10:23:35 -04:00
Brad King
40d3f5a227 Merge topic 'revert-add_test-special-chars'
5fc5f4d26e add_test: Revert "Allow special characters in test name"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5067
2020-07-28 08:24:34 -04:00
Brad King
5fc5f4d26e add_test: Revert "Allow special characters in test name"
Revert commit f84af8e270 (add_test: Allow special characters in test
name, 2020-05-16, v3.18.0-rc1~142^2).  Unfortunately the fix breaks
projects that were working around the limitation with manual escaping.
The fix can be re-introduced with a policy in a future version.

Also add a 3.18.1 release note explaining the change.

Fixes: #21017, #20965
Issue: #19391
2020-07-28 08:04:11 +10:00
Kyle Edwards
fed7d8f76d file(DOWNLOAD): Make file argument optional 2020-07-27 11:26:50 -04:00
Brad King
2cb664fd77 Merge topic 'file-GET_RUNTIME_DEPENDENCIES-terms'
2b60088d14 Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5053
2020-07-23 14:11:53 -04:00
Brad King
2b60088d14 Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names 2020-07-23 13:47:24 -04:00
Brad King
a62b4f1d2d Merge topic 'doc-find_package'
cc92a4c228 Help: Fix typo in find_package documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5014
2020-07-15 06:46:22 -04:00
Brad King
6b845e9066 Merge topic 'doc-find_package' into release-3.18
cc92a4c228 Help: Fix typo in find_package documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5014
2020-07-15 06:46:21 -04:00
Kai Koehne
cc92a4c228 Help: Fix typo in find_package documentation 2020-07-15 06:44:33 -04:00
Brad King
6a68765a4d Merge topic 'doc-source-prop-dir-options'
0bdb1a77d1 Help: Clarify wording of dir-related source property options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5000
2020-07-13 07:52:01 -04:00
Craig Scott
0bdb1a77d1 Help: Clarify wording of dir-related source property options 2020-07-13 10:06:52 +10:00
Brad King
95db8c5db5 Merge topic 'variable_watch_docs'
bb15663858 Help: Expand documentation of variable_watch()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4990
2020-07-10 06:47:20 -04:00
Brad King
a5064f6e65 Merge topic 'source_file_both_props'
961ee62faa Help: Update get_property and get_source_file_property docs
1235f2d747 set_property: Allow both DIRECTORY and TARGET_DIRECTORY together
177052d6b8 set_property: Fix name of TARGET_DIRECTORY option in error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4994
2020-07-10 06:45:09 -04:00
Petr Kmoch
bb15663858 Help: Expand documentation of variable_watch()
Document parameters and corner-case behaviour of variable_watch() command.
2020-07-09 17:22:59 +02:00
Brad King
a054211dd9 Merge topic 'install'
9a25278f8c Help: advise against CMAKE_INSTALL_PREFIX in install DESTINATION.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4988
2020-07-09 06:52:55 -04:00
Alexandru Croitor
961ee62faa Help: Update get_property and get_source_file_property docs
Specify the names and alternatives a bit more clearly.
2020-07-09 06:35:06 -04:00
Alexandru Croitor
1235f2d747 set_property: Allow both DIRECTORY and TARGET_DIRECTORY together
Allow to specify both DIRECTORY and TARGET_DIRECTORY at the same time in
`set_source_files_properties()` and `set_property(SOURCE)` commands.

Add test cases and update the documentation.

Fixes: #20932
2020-07-09 06:33:52 -04:00
Joachim Wuttke (h)
9a25278f8c Help: advise against CMAKE_INSTALL_PREFIX in install DESTINATION.
as per my uncontradicted post
 https://discourse.cmake.org/t/local-install-vs-install-for-cpack-absolute-vs-relative-path/623/2?u=jwuttke
2020-07-08 15:09:19 +02:00
Brad King
ee781ac59d Merge topic 'doc-versionadded'
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
0c87afceab Help/dev: Add maintainer guide step for 'versionadded' documentation markup
dbd453c2ff Utilities/Sphinx: Add script for inserting ".. versionadded" directive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !4947
2020-07-07 09:22:28 -04:00
Kitware Robot
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00
Brad King
9e1cd8ea45 Merge topic 'doc-file_ARCHIVE_synopsis'
f9766dad19 Help: Update file(ARCHIVE...) synopsis for renamed options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4977
2020-07-06 09:24:48 -04:00
Craig Scott
f9766dad19 Help: Update file(ARCHIVE...) synopsis for renamed options
The FILES and DIRECTORY options were renamed in bbcff21f71
(file(ARCHIVE*): Collapse FILES and DIRECTORY options, 2020-06-30), 
but the synopsis part of the file() documentation was missed.
The synopsis also typically only shows the mandatory options.
Update the synopsis to reflect the name changes and omit the
DESTINATION option since it is not mandatory.
2020-07-06 20:15:09 +10:00
Brad King
b7af2811ae Merge topic 'configure_file-permission-control'
27b03281e2 configure_file: Add option to control file permissions transfer to copy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4941
2020-07-01 07:03:03 -04:00
Brad King
0ca6bb8575 Merge topic 'file-ARCHIVE-files-dirs' into release-3.18
bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4955
2020-07-01 07:00:42 -04:00
Brad King
9c3e9881ef Merge topic 'file-ARCHIVE-files-dirs'
bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4955
2020-07-01 07:00:42 -04:00
Rahul Gottipati
27b03281e2 configure_file: Add option to control file permissions transfer to copy
Issue: #20866
2020-06-30 11:20:41 -04:00
Brad King
221fd89251 Merge topic 'file-CONFIGURE-subdir' into release-3.18
e5f5eeca2f file: Fix CONFIGURE output relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4951
2020-06-30 08:04:07 -04:00
Brad King
947a518716 Merge topic 'file-CONFIGURE-subdir'
e5f5eeca2f file: Fix CONFIGURE output relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4951
2020-06-30 08:04:07 -04:00
Craig Scott
bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS 
to more accurately describe the way the options are used.

Fixes: #20884
2020-06-30 22:01:35 +10:00
Brad King
e5f5eeca2f file: Fix CONFIGURE output relative path
In commit a6fee09484 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory.  Treat them with
respect to the current binary directory instead.

Fixes: #20885
2020-06-29 09:20:42 -04:00
Craig Scott
95159b7dea file(ARCHIVE_CREATE): Rename TYPE option to COMPRESSION
Fixes: #20883
2020-06-27 18:38:28 +10:00
Craig Scott
bc45bdc819 Help: Fix contents indenting for file(ARCHIVE_...) subcommands 2020-06-27 16:33:29 +10:00
Brad King
1f47a65c7a Merge topic 'doc-get_target_property' into release-3.18
f4b911a2c9 Help: Update docs for failure result of get_target_property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4933
2020-06-23 08:50:54 -04:00
Christopher Tetreault
f4b911a2c9 Help: Update docs for failure result of get_target_property
If `get_target_property` fails to find a value for a non-inherited
property, it appends `-NOTFOUND` to the var name and sets that as the
result, rather than setting the value of the var to `NOTFOUND`.
2020-06-23 08:17:59 -04:00
Robert Maynard
e5279c2c8f Help: Better document that CMP0105 controls DEVICE_LINK parsing 2020-06-18 12:07:26 -04:00
Brad King
35a192788f Merge topic 'doc-EXCLUDE_FROM_ALL'
e262123fee Help: Clarify the effect of EXCLUDE_FROM_ALL on target installation
a09195e7bf Help: Rename 'artefact' to 'artifact' in target_precompile_headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4840
2020-06-03 07:48:13 -04:00
Arcturus
a09195e7bf Help: Rename 'artefact' to 'artifact' in target_precompile_headers 2020-06-02 13:26:38 -04:00
Marc Chevrier
056489d567 add_library/add_executable: allow local alias to imported targets
Fixes: #20641
2020-06-02 17:11:47 +02:00
Marc Chevrier
254f2b9058 Help: add_executable: Add TOC 2020-06-02 15:37:21 +02:00
Brad King
3a9b257ee7 Merge topic 'cmake_language-check-invalid-commands'
12e483c563 cmake_language: check CALL with control command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4788
2020-05-27 08:17:49 -04:00
Marc Chevrier
12e483c563 cmake_language: check CALL with control command
Fixes: #20739
2020-05-26 07:27:35 -04:00
Brad King
3a1853b9fd Merge topic 'doc-updates'
b3e4fb5144 Help: clarify add_definitions() and add_compile_definitions() behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4786
2020-05-25 15:50:18 -04:00