Commit Graph

1677 Commits

Author SHA1 Message Date
Brad King
e782811cfe execute_process: Change default ENCODING to UTF-8
Windows is heading toward making UTF-8 the preferred MBCS.  As CMake's
internal encoding, `UTF-8` is effectively equivalent to `NONE`, which
was CMake's behavior prior to 3.15's accidental change to `AUTO`.
Behavior of `ENCODING UTF-8` is independent of CMake's internal
encoding, making it in principle a better default than `NONE`.

Add policy CMP0176 for compatibility and to document the default's
history.

Fixes: #26262
2024-09-16 06:37:46 -04:00
Brad King
3898e53e82 execute_process: Document and test ENCODING default
The default was originally AUTO in commit 2ed473b3b8 (execute_process:
Add ENCODING option for Windows child process output, 2016-11-23,
v3.8.0-rc1~232^2) but was changed back to NONE by commit 07c3380a6e
(execute_process: Restore no-decoding default behavior, 2017-02-13,
v3.8.0-rc2~26^2) for CMake 3.8.  Later it was accidentally changed back
to AUTO by commit b783e62533 (cmExecuteProcessCommand: Port to
cmArgumentParser, 2019-03-25, v3.15.0-rc1~270^2) in CMake 3.15 but the
documentation was not updated.  Document the current default, AUTO, and
add a test case to verify it.

Issue: #26262
2024-09-13 08:19:57 -04:00
Brad King
d67519fce8 Help/command/execute_process: Improve formatting of ENCODING names 2024-09-13 08:19:35 -04:00
Brad King
b91ea1b368 Merge topic 'file-archive-workdir'
d8a9aabd24 file(ARCHIVE_CREATE): add WORKING_DIRECTORY option
d65b5a8e03 Help: Format file(ARCHIVE*) options as definition lists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9803
2024-09-12 08:10:54 -04:00
Yuri Witte
d8a9aabd24 file(ARCHIVE_CREATE): add WORKING_DIRECTORY option
Fixes: #25260
Issue: #21653
2024-09-11 09:52:32 -04:00
Brad King
d65b5a8e03 Help: Format file(ARCHIVE*) options as definition lists 2024-09-11 09:50:55 -04:00
Brad King
dd023d9707 Merge topic 'add_custom_command-arg-handling'
ec519f3e97 add_custom_command: Validate arguments more rigorously
8dc8be0884 AndroidTestUtilities: Remove DEPENDS that was being silently ignored
316840b430 Tests: Add missing POST_BUILD to custom commands
f5f80305ef ExternalProject: Ensure keywords requiring an argument have one

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9785
2024-09-11 09:32:24 -04:00
Craig Scott
ec519f3e97
add_custom_command: Validate arguments more rigorously
Add a new CMP0175 policy to preserve backward compatibility
for projects that were using unsupported keywords or arguments.

Fixes: #26096, #21089, #18976
2024-09-10 08:19:09 +10: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
Brad King
252c2a6fcb Merge topic 'add_library-no-static-fallback'
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9347
2024-04-01 09:38:14 -04:00
Brad King
bed32f400e file(DOWNLOAD|UPLOAD): Document TLS_VERSION fallback to environment variable
This was missed by commit 434fe8a34b (file(DOWNLOAD|UPLOAD): Add
CMAKE_TLS_VERSION environment variable, 2024-02-26).
2024-03-29 14:17:58 -04:00
Peter Kokot
e722f73e40
Help: Document MANUALLY_ADDED_DEPENDENCIES in add_dependencies
This adds a note about the MANUALLY_ADDED_DEPENDENCIES target property
to the add_dependencies documentation page. It was introduced in v3.8.0.
2024-03-29 18:43:30 +01:00
Asit Dhal
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them
Add policy CMP0164 to provide compatibility.

Fixes: #25759
2024-03-29 11:06:32 -04:00
Brad King
bd3eaf83a1 Merge topic 'move-install-note'
8cbd6f5754 Help: Fix location of install() note about superseded commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9382
2024-03-29 09:15:11 -04:00
FeRD (Frank Dana)
8cbd6f5754 Help: Fix location of install() note about superseded commands
The note regarding commands superseded by install() somehow wound
up nested under the install(EXPORT) signature, when it has nothing
to do with install(EXPORT). Move it to the top level, immediately
before the Examples section.
2024-03-28 16:59:00 -04:00
Juan Ramos
89aac1fbe8 add_dependencies: Document behavior under Ninja generators
Closes: #25796
2024-03-28 09:48:08 -07:00
Brad King
cf6083cc6e Merge topic 'doc-linker-vars'
6ba2bbc0f3 Help: Restructure and improve LINKER_TYPE docs
c39bc6e412 Help: CMAKE_<LANG>_USING_LINKER_<TYPE> can be a list of flags
1c7ccefd83 Help: Add custom linker example for CMAKE_<LANG>_USING_LINKER_<TYPE>
aecea7b28b Help: Grammar, typos and wording improvements for linker variables
5b21897c6e Help: Remove stray formatting for try_compile() LINKER_LANGUAGE keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9362
2024-03-27 08:18:10 -04:00
Craig Scott
5b21897c6e
Help: Remove stray formatting for try_compile() LINKER_LANGUAGE keyword 2024-03-22 20:58:32 +11:00
Brad King
aa643b66a8 Merge topic 'doc-release-3.29-typos'
eceb368ccc Help: Fix typos in 3.29 docs
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9353
2024-03-19 10:10:16 -04:00
Brad King
b877fb49ce Merge topic 'doc-release-3.29-typos' into release-3.29
eceb368ccc Help: Fix typos in 3.29 docs
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9353
2024-03-19 10:10:15 -04:00
Brad King
6b035118de Merge topic 'doc-exit-code-range'
c980745b82 Help: Specify advisable range for exit code in cmake_language(EXIT)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9352
2024-03-19 10:09:20 -04:00
Craig Scott
c980745b82
Help: Specify advisable range for exit code in cmake_language(EXIT)
The limitations added here are documented in the bash shell's
reference manual.
2024-03-19 22:37:52 +11:00
Craig Scott
eceb368ccc
Help: Fix typos in 3.29 docs 2024-03-19 21:47:28 +11:00
Brad King
e3a8a6fc0c Merge topic 'doc-project-include-vars-3.29'
dcb894fb00 Help: Update project() code injection for new 3.29 include behavior
09cf39ab07 Help: Improve wording of CMAKE_PROJECT_..._INCLUDE... changes for 3.29

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9343
2024-03-18 13:59:53 -04:00
Craig Scott
dcb894fb00
Help: Update project() code injection for new 3.29 include behavior
Specifically, the various CMAKE_PROJECT_...INCLUDE... variables can
now take a list of things, and those things can be module names
too, not just file names.
2024-03-16 17:43:25 +11:00
Brad King
b7c78e1592 Merge topic 'export-find_dependency-calls'
3a739d4dcb EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9336
2024-03-13 10:57:08 -04:00
Brad King
3a739d4dcb EXPORT_PACKAGE_DEPENDENCIES: Add experimental feature gate
Some design concerns have been raised after trying the 3.29 release
candidates.  Avoid committing to a stable public interface for now.

Issue: #25767
2024-03-12 14:24:53 -04:00
Brad King
89e99cca63 Merge topic 'ctest-j-default'
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
bbcbcff7d9 cmCTestMultiProcessHandler: Modernize member initialization
7457b474a1 Tests: Remove unnecessary parallel suppression from CTestCoverageCollectGCOV
ae69801d96 Tests: Convert CTestTestSkipReturnCode to RunCMake.ctest_test case
30dda49416 Tests: Convert CTestTestSerialOrder to RunCMake.ctest_test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9315
2024-03-11 10:18:50 -04:00
Brad King
5de1e21659 ctest: Allow passing -j without value to choose a contextual default
Under job server integration, added by commit 80fe56c481 (ctest: Add
support for running under a make job server on POSIX systems,
2023-11-15, v3.29.0-rc1~324^2), use a very high default so that
parallelism is effectively limited only by available job server tokens.

Otherwise, choose a default limit based on the number of processors.

Also allow passing `0` to specify unbounded parallelism.

Fixes: #25739
2024-03-10 11:41:39 -04:00
Brad King
7d1aae7a60 Merge topic 'Help-add_custom_command-grammo'
b03356f954 Help/add_custom_command: fix verb grammo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9297
2024-02-29 07:59:28 -05:00
Ben Boeckel
b03356f954 Help/add_custom_command: fix verb grammo 2024-02-28 13:21:52 -05:00
Brad King
c481ddda14 Merge topic 'curl-tls-version'
434fe8a34b file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variable
fb9a6cf909 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
8e6776b9f3 file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9290
2024-02-28 09:03:20 -05:00
Brad King
fb9a6cf909 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
Issue: #25701
2024-02-28 08:40:27 -05:00
Brad King
8e6776b9f3 file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connections
Add an option to specify the minimum allowed TLS version for https
connections.

Issue: #25701
2024-02-28 08:40:14 -05:00
Brad King
70293ec345 Merge topic 'Help-file-ARCHIVE_EXTRACT-mention-working-dir'
189d28d77d Help/file: mention the working directory for `ARCHIVE_EXTRACT`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9291
2024-02-27 09:11:43 -05:00
Brad King
5ac8368922 Merge topic 'Help-file-ARCHIVE_EXTRACT-mention-working-dir' into release-3.29
189d28d77d Help/file: mention the working directory for `ARCHIVE_EXTRACT`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9291
2024-02-27 09:11:42 -05:00
Ben Boeckel
189d28d77d Help/file: mention the working directory for ARCHIVE_EXTRACT
See: https://discourse.cmake.org/t/10135
2024-02-27 05:53:08 -05:00
Brad King
2c646641ec Help: Document create_test_sourcelist source path convention
Document the change in commit a29ca55b1f (create_test_sourcelist: use
the full path to the driver, 2023-12-09, v3.29.0-rc1~264^2).
2024-02-22 09:37:23 -05:00
Brad King
c21f0eb30b Help: Modernize create_test_sourcelist documentation 2024-02-22 09:32:00 -05:00
Robert Maynard
af293ff7c3 Help: Explicitly discourage absolute install destinations
Document some of the problems caused by absolute install destinations.
Encourage use of relative paths.
2024-02-16 09:53:55 -05:00
Johannes Schultz
c6f56153bb Help: Fix example for return command
`cmake_minimum_required` is the correct command, not
`cmake_version_required`.
2024-02-15 10:42:25 -05:00
Brad King
d968391a0f Merge topic 'doc-autogen' into release-3.29
ccaf529c4e Autogen: Update Documentation
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9223
2024-02-08 11:10:47 -05:00
Orkun Tokdemir
ccaf529c4e Autogen: Update Documentation
* Add Qt 6 to documentation
* Add explanation about `<ORIGIN>_autogen_timestamp_deps`

Fixes: #25201
2024-02-08 09:16:37 -05:00
Brad King
2ce6337503 Help: Reword if(EXISTS) suggestion to prefer if(IS_READABLE) 2024-02-06 09:29:11 -05:00
Brad King
23d7863375 Help: Fix cmake_language(EXIT) signature anchor 2024-02-06 09:23:42 -05:00
Brad King
58d424bca1 Merge topic 'add_custom_command-target-alias'
3b07ec631d add_custom_command: Allow adding build event via ALIAS target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9201
2024-02-01 08:32:20 -05:00
Chen Linxuan
3b07ec631d add_custom_command: Allow adding build event via ALIAS target
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2024-02-01 08:21:41 -05:00
Brad King
03206842ff Merge topic 'test-define-prop'
6c3311d53b Help: Document property redefinition semantics
7aacae4e0e Tests: Add unit tests for property redefinition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9136
2024-01-30 11:31:10 -05:00
FeRD (Frank Dana)
6c3311d53b Help: Document property redefinition semantics
Add a section to the `define_property()` documentation which
details the behavior when attempting to redefine an existing
property. (The command is silently ignored.)

Provide an example using `get_property()` to examine a property
definition created with `define_property()`.
2024-01-29 05:23:37 -05:00
Brad King
84dd192326 Merge topic 'doc-configure_file'
682a513bbb Help: Organize configure_file documentation into sections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !9191
2024-01-27 10:10:09 -05:00
Brad King
682a513bbb Help: Organize configure_file documentation into sections 2024-01-26 10:29:57 -05:00
Alex Neundorf
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
These options can be used to specify files which can be used
to restrict the set of tests that will be executed.

Fixes: #25455
2024-01-25 12:38:04 -05:00
leha-bot
1bb1769235 cmake_language: Add EXIT subcommand
Add tests to cover these cases:

* run as regular CMake module, in NORMAL_MODE (expected to fail);
* run as CMake script in SCRIPT_MODE (expected to exit with given code);
* run as CMake script that `include()`-s another script with EXIT subcommand;
* run as CMake script which EVAL-uates EXIT subcommand via
  `cmake_language(EVAL CODE "<cmake code>")`.

Fixes: #23162
2024-01-16 10:41:31 +03:00
Cristian Le
fa00928bcd file: STRINGS + REGEX store match results
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-01-09 16:36:55 -05:00
Brad King
951656385d Merge topic 'doc-get-properties-inherited'
8086badba4 Help: Fix wrong return values for unset inherited properties
1ca5ec67b0 Help: Add missing DIRECTORY keyword to set_tests_properties() signature
34379f005b Help: Use <variable> consistently in property getter commands
29ccc9a4cd Help: Use <xxx> for non-keyword arguments in property command signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9131
2024-01-05 10:18:42 -05:00
Craig Scott
8086badba4
Help: Fix wrong return values for unset inherited properties
Since ff6234509e (Help: Clarify behavior of INHERITED properties, 2018-03-21),
the docs for some get_..._property() commands incorrectly describe
the behavior for inherited properties. When a property is not set, even
in a parent scope, the returned result from the get_..._property()
command is the same whether the property is inherited or not.
The docs incorrectly stated that an empty string would be returned
for inherited properties in such cases.
2024-01-05 17:40:16 +11:00
Craig Scott
1ca5ec67b0
Help: Add missing DIRECTORY keyword to set_tests_properties() signature 2024-01-05 16:45:27 +11:00
Craig Scott
34379f005b
Help: Use <variable> consistently in property getter commands
Property-related commands used a mix of <VAR>, <var>, or
<variable> to specify the variable to store the result in. The <VAR>
form is particularly confusing, since being uppercase it looks more
like a keyword. Use <variable> consistently across all the commands
so that the behavior is clear.
2024-01-05 15:37:39 +11:00
Craig Scott
29ccc9a4cd
Help: Use <xxx> for non-keyword arguments in property command signatures 2024-01-05 15:31:39 +11:00
Brad King
2b4bc8d469 Merge topic 'HELP-string_LENGTH-link-error'
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:14 -05:00
Brad King
f11f0f52b7 Merge topic 'HELP-string_LENGTH-link-error' into release-3.28
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:13 -05:00
Marc Chevrier
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description
Make the link target explicit to avoid ambiguity with `JSON LENGTH`.

Fixes: #25546
2024-01-03 14:14:18 -05:00
Brad King
a350d92c06 Merge topic 'add_test-CROSSCOMPILING_EMULATOR-exclusive'
ca5a300d7f add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8947
2023-12-20 09:09:48 -05:00
Ralf Habacker
ca5a300d7f add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compiling
Add policy CMP0158 to provide compatibility for existing projects.

Fixes: #23672
2023-12-19 10:00:55 -05:00
Craig Scott
d0ab70d57d
Help: Fix typo in dependency provider method keyword
The cmake.vim file is generated by scanning for keyword-like
strings in the docs. Update the corresponding wrong entry
there too directly for now, which will fix the wrong entry until
the next full regeneration of the file.

Fixes: #25503
2023-12-16 10:27:39 +11:00
Brad King
6ba3bb0563 Merge topic 'cmake-test-launcher'
88863d83d6 fileapi: Add test launcher to codemodel-v2
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
b44e38a397 cmFileAPICodemodel: Add missing std::move()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8963
2023-12-15 09:34:20 -05:00
Ralf Habacker
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
2023-12-13 10:20:43 -05:00
Brad King
f522cf4546 Merge topic 'doc-xcframeworks-stubs-apple'
e831eef933 Help: Note case where IMPORTED_IMPLIB isn't needed for (xc)frameworks
01735badee Help: XCFrameworks and stubs are supported on all Apple, not just macOS
6ac50df591 Help: Add missing versionadded directives for IMPORTED_IMPLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9058
2023-12-13 09:34:51 -05:00
Brad King
ef6aec22a1 Merge topic 'doc-xcframeworks-stubs-apple' into release-3.28
e831eef933 Help: Note case where IMPORTED_IMPLIB isn't needed for (xc)frameworks
01735badee Help: XCFrameworks and stubs are supported on all Apple, not just macOS
6ac50df591 Help: Add missing versionadded directives for IMPORTED_IMPLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9058
2023-12-13 09:34:50 -05:00
Brad King
532c30a654 Merge topic 'Help-create_test_sourcelist'
464bc12bb7 Help/create_test_sourcelist: format arguments in the signature docs
131f9c9efa Help/create_test_sourcelist: add formatting markup
8540520902 Help/create_test_sourcelist: reflow prose

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9059
2023-12-12 08:35:07 -05:00
Ben Boeckel
464bc12bb7 Help/create_test_sourcelist: format arguments in the signature docs 2023-12-09 23:15:29 -05:00
Ben Boeckel
131f9c9efa Help/create_test_sourcelist: add formatting markup 2023-12-09 10:17:45 -05:00
Ben Boeckel
8540520902 Help/create_test_sourcelist: reflow prose 2023-12-09 10:17:16 -05:00
Craig Scott
01735badee
Help: XCFrameworks and stubs are supported on all Apple, not just macOS 2023-12-09 16:15:19 +11:00
Brad King
e1519edd91 Help: Use signature directive for the 'add_library' command
This allows individual signatures to be cross-referenced from elsewhere.
It also associates with each signature its main documentation via
indentation.
2023-12-06 13:05:23 -05:00
Brad King
bfc9e71d1f Help: Use signature directive for the 'add_executable' command
This allows individual signatures to be cross-referenced from elsewhere.
It also associates with each signature its main documentation via
indentation.
2023-12-06 13:03:03 -05:00
namniav
7fc6d7247a Help: Fix signature of add_library(<name> INTERFACE EXCLUDE_FROM_ALL)
This signature was added by commit 4391913133 (Add INTERFACE libraries
to generated buildsystem if they have SOURCES, 2020-07-20,
v3.19.0-rc1~346^2~1) with incorrect documentation.

Previously the documented signature as:

    add_library(<name> INTERFACE [<source>...] [EXCLUDE_FROM_ALL])

which is incorrect.  CMake would recognize `EXCLUDE_FROM_ALL` as a source
file and report an error that it doesn't exists.

The correct signature is:

    add_library(<name> INTERFACE [EXCLUDE_FROM_ALL] [<source>...])

which places `EXCLUDE_FROM_ALL` in the same position used by the
documentation of other signatures.

Fixes: #25463
2023-12-04 10:37:01 -05:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Brad King
2c923a7e28 Merge topic 'install-export-xcframework'
37bc3400cd CMakePackageConfigHelpers: Add generate_apple_platform_selection_file()
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
a90968e044 cmExportBuildFileGenerator: Add structs for target exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8969
2023-11-16 09:13:16 -05:00
Brad King
e48f2e69b5 Help: Clarify file() command multi-value argument placeholders
Use `<placeholder>...` syntax to imply "zero or more", as we do elsewhere.
2023-11-15 10:56:17 -05:00
Kyle Edwards
256bb0cc40 install(EXPORT): Add ability to point to .xcframework file
Issue: #25262
2023-11-15 09:10:58 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
Kyle Edwards
e62a3b8625 Help/export: Add signature directives 2023-11-13 11:07:52 -05:00
Brad King
92cc1f3b62 Merge topic 'Ninja-use-depslog'
bb7a0497ef cmTransformDepfile: warn when a depfile is not written to
c22c473bde Tests/Ninja*/CustomCommandDepfile: check that deps are in the database
b0177003e1 cmGlobalNinjaGenerator: tell `ninja` to actually read the depfile
45eff9145e cmAddCustomCommandCommand: use `cmStrCat`
c6445c615b Tests/RunCMake/Ninja: fix subdir prefix check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8911
2023-11-07 09:07:46 -05:00
Ben Boeckel
b0177003e1 cmGlobalNinjaGenerator: tell ninja to actually read the depfile
But only do so if the depfile is not specified as an output of the
command. Otherwise the command will out-of-date itself as `ninja`
deletes depfiles that it incorporates into the database and a missing
output will cause the command to run again.
2023-11-01 14:08:18 -04:00
Marc Chevrier
337bc5662c if(): add operators IS_READABLE, IS_WRITABLE and IS_EXECUTABLE.
Offers possibility to check for file or directory permissions.
2023-11-01 14:53:31 +01:00
Brad King
54e06c601d Help: Replace link with its http redirect 2023-10-19 09:24:41 -04:00
Brad King
dd78592ba1 Merge topic 'try_compile-alias-targets'
8f9f371668 try_compile: Add support for using ALIAS targets
9f8aa94192 Add missing `OUTPUT` in ExportImport test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8877
2023-10-17 10:22:54 -04:00
Cristian Le
8f9f371668 try_compile: Add support for using ALIAS targets
Fixes: #25337
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-16 20:22:23 +02:00
scivision
0f37000304 try_{compile,run}: add LINKER_LANGUAGE option
Fixes: #25326
2023-10-16 11:30:17 -04:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04:00
Brad King
f83790af0b Merge topic 'fileset-private-dep'
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8420
2023-09-21 09:39:56 -04:00
Brad King
51c2927816 Help: Clarify requirements for find_package to use lib{64,32,x32} paths
Issue: #25157
2023-09-20 12:44:00 -04:00
Brad King
e625255fe4 Help: Indent find_package REGISTRY_VIEW paragraphs together
In commit 8d7e80cf3d (find_* commands: add control over Windows registry
views, 2022-04-16, v3.24.0-rc1~201^2) this indentation was used for the
other find commands but was left out for `find_package`.
2023-09-20 12:31:27 -04:00
Martin Duffy
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can
model using file sets.  Add policy CMP0154 to treat generated sources
as private by default in targets with file sets.  Generated public
headers can be specified in public file sets.

Fixes: #24959
Issue: #15555
2023-09-20 10:25:24 -04:00
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
a273b7f5d4 Merge topic 'host-msystem-prefix'
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
cdcff0a0f0 cmCMakeHostSystemInformationCommand: Clarify function names and roles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8788
2023-09-11 12:27:37 -04:00
Brad King
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.

Issue: #24216
2023-09-10 07:33:47 -04:00
Brad King
5924a1f0eb Help: Document if() comparison number format
Fixes: #25237
2023-09-08 10:26:34 -04:00
FeRD (Frank Dana)
bbf3ed5422
Help: Explain block() policy-scope rules more clearly 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
2f319c6484
Help: Remove "this command" ambiguity in set() docs 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
9eecdc7ab7
Help: Use signature directive for cmake_policy() 2023-09-01 21:28:40 +10:00
Brad King
36a0950e94 Merge topic 'doc-cmake_minimum_required-deprecation'
741755f637 Help: Document cmake_minimum_required deprecation of old versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8742
2023-08-21 09:30:23 -04:00
Brad King
741755f637 Help: Document cmake_minimum_required deprecation of old versions
Document the deprecation warnings added by commit 5845c218d7 (Deprecate
compatibility with CMake versions older than 2.8.12, 2020-06-12,
v3.19.0-rc1~629^2) and commit 3a4791548d (Deprecate compatibility with
CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).

Fixes: #25196
2023-08-19 09:03:53 -04:00
scivision
136edadad4 Help:try_run: place options in their own section 2023-08-16 10:06:31 -04:00
scivision
a5b292c9a6 Help:try_compile: place options in their own section
As try_compile interface was enhanced in 3.25, the Help got a lot
longer. Make the options its own section for navigability.
2023-08-16 10:05:53 -04:00
Kyle Edwards
2ccb897d86 get_test_property(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
84e76fedb0 get_property(TEST): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
efc8f19cc5 set_tests_properties(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
753999d4db set_property(TEST): Add DIRECTORY option 2023-08-10 17:36:14 -04:00
Craig Scott
feca1d51ff Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:56 -04:00
Brad King
4240e74858 Merge topic 'doc-install'
b97350a151 Help: Add more install(TARGETS) examples
0827305032 Help: Clarify install(TARGETS) artifact-kind option group ordering
7bd6478dd0 Help: Use argument value placeholders consistently in install(TARGETS)
ae381e1075 Help: Reorganize install() sections
5d15231a67 Help: Revert "improve install() documentation of argument ordering"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8683
2023-08-07 12:02:45 -04:00
Brad King
efb21962fb Merge topic 'cxxmodules-try-compile'
be53c75852 cmExperimental: recycle the C++ modules API UUID
deb1c3cbd5 cmCoreTryCompile: forward module-related binutils variables
b768d293c5 cmCoreTryCompile: use the source type context for source files
93993c7ad4 cmArgumentParser: support storing a context value with parsing
c9ca5f6326 cmCoreTryCompile: parse `SOURCES_TYPE` argument
07551f35de cmCoreTryCompile: use `target_sources` for `try_compile` targets
aad9033b56 cmExperimental: support forwarding associated variables to `try_compile`
f6cf433256 cmExperimental: only forward C++ module support to non-ABI checks
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8639
2023-08-07 11:57:00 -04:00
Craig Scott
91336d061c
Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY 2023-08-04 19:16:28 +10:00
Brad King
b97350a151 Help: Add more install(TARGETS) examples
Add examples showing per-artifact components and per-configuration
destinations.

Fixes: #25144
2023-08-03 12:49:53 -04:00
Brad King
0827305032 Help: Clarify install(TARGETS) artifact-kind option group ordering
Revise the signature and description to explicitly distinguish the
initial group of artifact options from later groups that apply to
a specific kind.

Issue: #25144
Fixes: #16362
2023-08-03 12:49:53 -04:00
Brad King
7bd6478dd0 Help: Use argument value placeholders consistently in install(TARGETS) 2023-08-03 12:49:53 -04:00
Brad King
ae381e1075 Help: Reorganize install() sections
After switching to the signature directive we no longer need
per-signature sections.  Group all the signatures in one section.  Add a
table of contents since it is no longer redundant with the synopsis.
2023-08-03 12:49:46 -04:00
Brad King
5d15231a67 Help: Revert "improve install() documentation of argument ordering"
Revert commit f09fda97d8 (Help: improve install() documentation of
argument ordering, 2018-01-08, v3.11.0-rc1~126^2).  Although the
example it added is correct, its explanation is misleading.
Revert it to make room for an alternative.

Issue: #25144
Issue: #16362
2023-08-03 10:52:11 -04:00
Brad King
da51e8f59b Help: Cross-reference install command signatures as commands
Replace manual anchors with proper command signature cross-references.
2023-08-02 13:43:53 -04:00
Brad King
7a54bdf0c1 Help: Use signature directive for 'install' command
Replace manual anchors with signature directives.  Indent each
signature's documentation inside its directive.
2023-08-02 13:43:32 -04:00
Ben Boeckel
c9ca5f6326 cmCoreTryCompile: parse SOURCES_TYPE argument
This will serve to add context for the source listing in order to
properly mark sources as `FILE_SET TYPE CXX_MODULES` in the generated
code.
2023-07-31 11:37:47 -04:00
Kyle Edwards
4cf5eab79d Merge topic 'xcframework-find-library'
9bf8f7de06 find_library(): Add support for .xcframework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8661
2023-07-28 14:59:14 -04:00
Kyle Edwards
9bf8f7de06 find_library(): Add support for .xcframework
Issue: #21752
2023-07-28 14:41:45 -04:00
Brad King
e49ff2b2f2 Merge topic 'ExportTestLabelToJUnit'
2b99e64413 set_test_properties: link to the test properties in the documentation
b11e8afbfa ctest: export test labels to junit xml

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8635
2023-07-28 09:12:23 -04:00
Kyle Edwards
07ac0c0ae0 Merge topic 'xcframework-target-link-libraries'
7050ac56a1 macOS: Add support for linking against .xcframework folders
93ed53790c bootstrap: Unconditionally build libjsoncpp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8619
2023-07-27 10:06:22 -04:00
Brad King
c46182cf55 Merge topic 'doc-if-exists'
3ab132d86f Help: Document that if(EXISTS) requires paths to be readable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8656
2023-07-27 09:59:20 -04:00
Kyle Edwards
7050ac56a1 macOS: Add support for linking against .xcframework folders
Issue: #21752
2023-07-26 17:00:01 -04:00
Alex Neundorf
2b99e64413 set_test_properties: link to the test properties in the documentation
It was linking to the target properties, this was probably an oversight.
2023-07-26 22:59:59 +02:00
Brad King
3ab132d86f Help: Document that if(EXISTS) requires paths to be readable
Issue: #25125
2023-07-26 11:06:53 -04:00
Kyle Edwards
ff12a57d5e exec_program(): Remove by policy CMP0153 2023-07-25 11:09:56 -04:00
Brad King
6194193a8a Merge topic 'file-REAL_PATH-relative'
6b5f2dbbfe file(REAL_PATH): resolve symlinks before '..' components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8605
2023-07-24 08:43:19 -04:00
Robert Maynard
6b5f2dbbfe
file(REAL_PATH): resolve symlinks before '..' components
Previously REAL_PATH would collapse paths before resolving any symlinks
so if `..` crossed a symlink the output from `REAL_PATH` would be wrong.

It looked like REAL_PATH did this by mistake since it was a side-effect
of ensuring we had an absolute path before resolving symlinks.
2023-07-20 17:02:58 -04:00
Brad King
88c6dc75ba Merge topic 'command-job-server-aware'
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8547
2023-07-20 10:23:31 -04:00
Chris Mahoney
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE
Issue: #16273
2023-07-19 10:45:33 -04:00
Brad King
18d9a54ba6 Merge topic 'export-doc-config-map'
38737e3970 Help: Mention imported config mapping in export() and install() docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8637
2023-07-18 13:51:16 -04:00
Brad King
38737e3970 Help: Mention imported config mapping in export() and install() docs
Suggest the `CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>` variable for mapping
configurations of dependent projects to configurations exported by these
commands.

Issue: #25096
2023-07-18 11:11:14 -04:00
Brad King
d1538805b5 Merge topic 'doc-add_custom_command'
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: William Jones <william.luke.jones@gmail.com>
Merge-request: !8602
2023-06-29 11:49:35 -04:00
Brad King
7952e11466 Merge topic 'doc-add_custom_command' into release-3.27
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: William Jones <william.luke.jones@gmail.com>
Merge-request: !8602
2023-06-29 11:49:34 -04:00
Brad King
e588d29eaf Help: add_custom_command(TARGET) does not support USES_TERMINAL
Build events are attached to existing build statements so we cannot
independently control the job pool.

Issue: #25040
2023-06-29 10:57:38 -04:00
Brad King
6d549cd9fe Merge topic 'doc-target_precompile_headers'
a3dfaf8a5c Help: Fix wrong command name in target_precompile_headers docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8600
2023-06-29 10:07:02 -04:00
Brad King
c7e3668b00 Merge topic 'doc-target_precompile_headers' into release-3.27
a3dfaf8a5c Help: Fix wrong command name in target_precompile_headers docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8600
2023-06-29 10:07:01 -04:00
Brad King
28dc0ef040 Merge topic 'doc-list-xref'
60b393096f Help: Link to cmake-language(7) list docs from list() command docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8597
2023-06-29 09:54:14 -04:00
Craig Scott
a3dfaf8a5c
Help: Fix wrong command name in target_precompile_headers docs 2023-06-29 09:27:10 +10:00
Brad King
60b393096f Help: Link to cmake-language(7) list docs from list() command docs
Fixes: #25036
2023-06-28 07:51:37 -04:00
Brad King
024791a702 Merge topic 'alias-set-target-prop'
aed550410a Help: Clarify that you can't set properties on ALIAS targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8591
2023-06-27 11:03:37 -04:00
Ryan Friedman
aed550410a Help: Clarify that you can't set properties on ALIAS targets
Issue: #19445
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-26 12:47:26 -04:00
Brad King
9189a59f8b Merge topic 'doc-project-none'
9dd2dd5b77 Help: Restore project command docs for default languages and NONE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8585
2023-06-23 10:42:25 -04:00
Brad King
5fb68744d4 Merge topic 'doc-project-none' into release-3.27
9dd2dd5b77 Help: Restore project command docs for default languages and NONE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8585
2023-06-23 10:42:24 -04:00
Brad King
9dd2dd5b77 Help: Restore project command docs for default languages and NONE
In commit b787be2714 (Help: Update supported languages in project and
enable_language, 2023-01-20, v3.26.0-rc1~53^2) the relevant paragraph
was accidentally moved to the `enable_language` command documentation.

Fixes: #25016
2023-06-22 13:12:24 -04:00
Brad King
536c1de1d4 Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25.  Remove it.
2023-06-13 14:20:48 -04:00