Commit Graph

1520 Commits

Author SHA1 Message Date
Brad King
d65b5a8e03 Help: Format file(ARCHIVE*) options as definition lists 2024-09-11 09:50:55 -04:00
Craig Scott
012d116260 Merge topic 'cmp0168-populate-nondeclare-regression'
cbb727ca6b FetchContent: Don't update verify script timestamp if it doesn't change
795e7b44f2 Help: file(CONFIGURE) only updates output file timestamp if it changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9799
2024-09-08 18:32:40 -04:00
Craig Scott
795e7b44f2
Help: file(CONFIGURE) only updates output file timestamp if it changes 2024-09-06 15:48:38 +10:00
Craig Scott
2000abe74f
Help: Recommend good prefixes for cmake_parse_arguments, expand example
Fixes: #25773
2024-08-31 18:33:14 +10:00
Craig Scott
bb37d0e1a5
Help: Improve grammar and wording for cmake_parse_arguments 2024-08-31 18:10:32 +10:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King
cb2467d69a Merge topic 'if-space-dldt'
2c0d16df7b Help/command/if: fix formatting in precedence order overview

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9777
2024-08-28 10:04:04 -04:00
Brad King
72607d3402 Merge topic 'cps-export'
b2dc1bd149 CMake: Suppress IBM XL optimization warning
1a846c8849 Tests: Add tests for install(PACKAGE_INFO)
3d52d70b84 export: Add initial CPS support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9693
2024-08-27 09:43:51 -04:00
Aleksei Shpakovskii
2c0d16df7b Help/command/if: fix formatting in precedence order overview
Due to extra space symbols, it was rendered as definition list inside
list item, instead of plain list item.
2024-08-27 14:07:58 +02:00
Brad King
d625e832ed Merge topic 'cmake-parse-arguments-one-arg-empty-string'
ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9748
2024-08-26 09:53:16 -04:00
Craig Scott
d48834d277 Merge topic 'doc-get_property-undefined'
a1fdcb9d47 Help: get_property() result var is unset if property is not set
edee1b18b2 Help: Minor formatting and grammar fixes for get_property()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9769
2024-08-23 19:16:03 -04:00
Craig Scott
a1fdcb9d47
Help: get_property() result var is unset if property is not set
Fixes: #26152
2024-08-23 09:58:46 +10:00
Craig Scott
edee1b18b2
Help: Minor formatting and grammar fixes for get_property() 2024-08-23 09:57:14 +10:00
Craig Scott
ceeea4e511
cmake_parse_arguments: Set variable if empty string given after keyword
If a single-value keyword is followed by an empty string, the
command unsets the variable for that keyword instead of setting
it to the empty string. This is inconsistent and unexpected. Add
policy CMP0174 which ensures the variable for a single-value
keyword is always set when any value is given, not just for a
non-empty value.

The new CMP0174 policy only affects the PARSE_ARGV form of
cmake_parse_arguments. The older form silently drops all empty
string arguments before processing the argument list.

Fixes: #25972
2024-08-23 09:42:13 +10:00
Aleksei Shpakovskii
2e634501fd Help/command/if: list all condition operators in precedence order overview
This section is near the top and so can serve as an exhaustive
table of contents for the things that `if()` can check.
2024-08-22 11:31:12 -04:00
Brad King
e4a359e5d4 Help/command/if: Document variable expansion by IN_LIST
Previously this behavior was only mentioned implicitly by the command
signature.  Describe it explicitly as we do for other conditions that
automatically expand variables.

Fixes: #26234
2024-08-21 09:17:21 -04:00
Brad King
89d7ed5497 Merge topic 'fix-dependencies-searching'
4d4e008e69 file(GET_RUNTIME_DEPENDENCIES): Fix resolution of repeated ELF dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9704
2024-08-20 11:38:27 -04:00
Aliaksandr Averchanka
4d4e008e69 file(GET_RUNTIME_DEPENDENCIES): Fix resolution of repeated ELF dependencies
When a library file name is encountered multiple times, reuse the result
from the first time.  This more closely matches the behavior of the
dynamic loader on Linux.

Fixes: #24621
2024-08-19 08:57:04 +03:00
Craig Scott
13bf4dc9ef
Help: State valid scopes for using proj_SOURCE_DIR and proj_BINARY_DIR
Fixes: #25714
2024-08-17 16:11:22 +10:00
Matthew Woehlke
3d52d70b84 export: Add initial CPS support
Add initial support for exporting (install only, for now) Common Package
Specification (https://cps-org.github.io/cps/) format package
descriptions. This has some limitations, such as not supporting
generator expressions (as these cannot be portably exported), and only
partially supporting transitive dependencies, but should be usable for
at least some simple cases. (Actually, $<LINK_ONLY> is theoretically
supportable, but is not yet implemented.)

This still needs tests; these will be added in the next commit. Other
potential improvements include support for language-specific compile
definitions and inferring some package properties from project
properties. Additionally, there is no module support yet; this is partly
pending on having a tool agnostic format for providing the necessary
information.
2024-08-14 15:25:27 -04:00
FeRD (Frank Dana)
38aae609df Help(install): Move RENAME docs to FILES signature
The document's intro claims that the options documented up top are
the ones common to multiple signatures, but `RENAME` is only valid
for `install(FILES ...)`. Move it to that section of the docs.
2024-08-01 12:41:43 -04:00
Vito Gamberini
8555c33d92
PkgC: Add cmake_pkg_config(EXTRACT) command
* Wraps the llpkgc parser with cmPkgConfigParser
* Adds various resolution and mangling code under cmPkgConfigResolver
* Documents new command cmake_pkg_config(EXTRACT). Documentation is written with
  the assumption additional subcommands will be added soon.
* Adds various tests for the above
2024-07-29 13:14:46 -04:00
Brad King
b0ba99f152 Merge topic 'doc-add_test-typo'
ca39258a66 Help: Fix typo in add_test documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9687
2024-07-29 10:59:00 -04:00
Brad King
ca39258a66 Help: Fix typo in add_test documentation 2024-07-26 10:37:35 -04:00
Martin Duffy
159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00
Juan Ramos
197cb419d1 add_custom_command: Add CODEGEN support
By specifying CODEGEN as an argument to add_custom_command the
custom command will be added to a codegen build target.

The intent is to provide a convenient way for users to get
their generated files without having to build the whole project.

This can be helpful for code analysis tools which can be useful
for IDEs and CI.
2024-07-01 12:02:49 -04:00
Asit Dhal
95323c90a1 file(MAKE_DIRECTORY): Add optional RESULT keyword to capture failure.
Fixes: #26041
2024-06-24 02:20:43 +02:00
Brad King
60da7cb84e Merge topic 'doc-add_subdirectory-EXCLUDE_FROM_ALL'
2449c04d8d Help: improve docs for the EXCLUDE_FROM_ALL directory property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9497
2024-06-06 08:41:59 -04:00
Brad King
97328b05c3 Merge topic 'doc-add_subdirectory-EXCLUDE_FROM_ALL' into release-3.30
2449c04d8d Help: improve docs for the EXCLUDE_FROM_ALL directory property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9497
2024-06-06 08:41:58 -04:00
Alex Neundorf
2449c04d8d Help: improve docs for the EXCLUDE_FROM_ALL directory property
This patch improves the wording of the documentation of the
EXCLUDE_FROM_ALL directory property, and makes the
add_subdirectory()- and fetchcontent-documentation refer to it.
2024-06-04 16:58:54 +02:00
Brad King
d1cf2a2206 Merge topic 'file-accept-empty-lists'
7c516f7e28 file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty lists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9570
2024-06-03 09:08:52 -04:00
Craig Scott
422ab50a8e Merge topic 'doc-find_package-typical-usage'
4b55d56259 Help: Start find_package() docs with a new "Typical Usage" section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9567
2024-06-01 18:25:18 -04:00
Brad King
e0a11dfa24 Merge topic 'dep-provider-try_compile'
4cb5bb014d try_compile: Propagating top level includes into whole-project calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9532
2024-05-31 09:20:27 -04:00
Craig Scott
7c516f7e28
file(): TOUCH, TOUCH_NOCREATE and MAKE_DIRECTORY accept empty lists
Projects may be generating a list of files or directories to pass as arguments
to file(TOUCH), file(TOUCH_NOCREATE), or file(MAKE_DIRECTORY). Those
lists might end up being empty, so rather than requiring at least one item,
allow an empty list.

Fixes: #24897
2024-05-31 22:55:20 +10:00
Craig Scott
4b55d56259
Help: Start find_package() docs with a new "Typical Usage" section
Fixes: #22680
2024-05-31 16:05:23 +10:00
Craig Scott
4cb5bb014d
try_compile: Propagating top level includes into whole-project calls
Fixes: #24151
2024-05-30 19:01:03 +10:00
Brad King
645ca62b1b Merge topic 'doc-macro'
67171a99be Help: Fix inaccurate use of "function" in macro docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Juan Ramos <juan.ramos@kitware.com>
Merge-request: !9534
2024-05-21 09:17:17 -04:00
Dave Abrahams
67171a99be Help: Fix inaccurate use of "function" in macro docs 2024-05-21 09:13:57 -04:00
Brad King
d37467e036 Merge topic 'custom-command-output-hash-character'
8d2a503c1e add_custom_command: Allow OUTPUT filenames containing a hash '#' character
b38000d774 cmGlobalXCodeGenerator: Re-implement legacy makefile path escaping
d929089687 cmGlobalXCodeGenerator: Do not use legacy makefile escaping in shell commands
d61fc2c52e cmGlobalXCodeGenerator: Migrate legacy makefile path escaping to local helper
6010e007c7 cmState: Add method to check for the Borland Makefiles generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9514
2024-05-16 11:24:56 -04:00
Glenn Coombs
8d2a503c1e add_custom_command: Allow OUTPUT filenames containing a hash '#' character
Most generators now support this character after escaping and quoting
cleanups over time.  Disallow it only on generators that do support it.

Fixes: #25604
2024-05-15 13:27:46 -04:00
scivision
fc2bce54c7
Help: try_compile how to pass compiler options
it wasn't obvious how to pass compiler options. Since the old
add_definitions() is used we can workaround this by passing
compiler options there.
2024-05-11 22:57:38 -04:00
Juan Ramos
769866163a Help: Fix cmake_path example
Fixes: #25938
2024-04-26 08:49:07 -07:00
Brad King
a4b7a13c23 Merge topic 'doc-genex'
263f6b888c Help: Document TARGET_PROPERTY genex handling of transitive properties
f70eb84be7 Help: Clarify role of TARGET_NAME generator expression
36145e2680 Help: Organize target-dependent generator expressions into subsections
50eadd794e Help: Clarify cross-references to target-dependent generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9460
2024-04-25 11:25:30 -04:00
Brad King
50eadd794e Help: Clarify cross-references to target-dependent generator expressions 2024-04-25 10:49:16 -04:00
Brad King
2c3a9d5385 Merge topic 'help.file'
d2d2ffe1c1 Help: file: document GET_RUNTIME_DEPENDENCIES separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Juan Ramos <juan.ramos@kitware.com>
Merge-request: !9456
2024-04-25 10:28:36 -04:00
Joachim Wuttke (h)
d2d2ffe1c1 Help: file: document GET_RUNTIME_DEPENDENCIES separately
Moved documentation of file(GET_RUNTIME_DEPENDENCIES ...) from
the 'Reading' section to a separate section at the bottom of
the page. Because it is a very long text, and because this
signature is quite different from all the others in the
'Reading' section.
2024-04-24 15:28:39 +02:00
Brad King
835f34949e Help: Update cmake-buildsystem(7) build and usage requirements
Re-organize the section to explicitly describe target-specific
commands, build properties, and usage requirement properties.
Add builtin transitive properties that have been created since
the document was first written.
2024-04-24 09:06:32 -04:00
Martin Stadler
dc7a810a75 Help: Clarify documentation on regex character classes
In particular, give an example of matching `]`.
2024-04-11 08:46:37 -04:00
Craig Scott
97464aa970
enable_language(): Fail if called before project()
Fixes: #25550
2024-04-02 23:00:38 +11:00
Brad King
dea9982990 Merge topic 'patch-help-manually-added-dependencies'
e722f73e40 Help: Document MANUALLY_ADDED_DEPENDENCIES in add_dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9388
2024-04-01 09:42:32 -04:00