Commit Graph

1166 Commits

Author SHA1 Message Date
Craig Scott
fadc93286a
Help: Add crossrefs to ctest output control options 2022-08-19 14:47:01 +10:00
Craig Scott
8981e88b18
Help: Add missing closing quote on C++ example 2022-08-19 14:03:18 +10:00
Eisuke Kawashima
5635d33656 Help: Fix reST syntax typo in find_package docs 2022-08-03 10:02:21 -04:00
Brad King
d4336c9c99 Merge topic 'doc-if-PATH_EQUAL' into release-3.24
37e01773e4 Help: Clarify behavior of path-based equality conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7503
2022-07-26 09:22:28 -04:00
Craig Scott
37e01773e4 Help: Clarify behavior of path-based equality conditions
The docs for if(PATH_EQUAL) did not mention the component-wise
nature of the checks. It also claimed no normalization was
performed, but multiple separators are effectively collapsed
(part of normalization). Improve the wording to clarify both of
these points.

Also update the corresponding description of cmake_path(COMPARE),
which had the same inaccuracy.

Fixes: #23758
2022-07-24 16:03:20 +10:00
Craig Scott
4f7a0c25d2 Help: Document BYPASS_PROVIDER keyword for find_package()
Fixes: #23669
2022-07-23 21:43:49 +10:00
Brad King
70c26a65b7 Help: Clarify execute_process OS-specific command-line encoding
Issue: #23557
2022-07-20 11:46:23 -04:00
Craig Scott
c7c5a50b97 Help: Add missing PRIVATE keyword to target_sources() example
Fixes: #23746
2022-07-20 20:19:37 +10:00
Michael Hirsch
ee6b429498 Help: Clarify that option() is a boolean
Also describe `option()` behavior in project vs. script mode.
2022-07-05 11:05:54 -04:00
Brad King
012eb49263 Merge topic 'fetchcontent-global-targets' into release-3.24
f19b48e0b8 FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
1305bade56 Help: Add missing version directive for find_package() GLOBAL keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7347
2022-06-11 06:13:57 -04:00
Craig Scott
1305bade56 Help: Add missing version directive for find_package() GLOBAL keyword 2022-06-10 18:08:36 +10:00
Brad King
9d43059132 Merge topic 'doc-using-deps-guide' into release-3.24
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7332
2022-06-09 09:03:13 -04:00
Craig Scott
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide
The guide previously only focused on the find_package() command,
with a bias towards libraries. FetchContent was not mentioned at all.
Reorganise and update the existing content. Add new sections to cover
providing dependencies with FetchContent and dependency providers.
Improve discoverability of the guide by mentioning it at the beginning
of the find_package(), FetchContent and dependency provider docs.
2022-06-09 22:55:11 +10:00
Brad King
ab1edff492 Merge topic 'if-command-PATH_EQUAL'
be4b9e10af if command: Add PATH_EQUAL operator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7321
2022-06-06 09:47:45 -04:00
Craig Scott
afcf275cc9 Help: Fix formatting and missing cross-reference for find_package()
Amends 42f7e39789 (Find: Support per call disabling of
CMAKE_INSTALL_PREFIX, 2022-03-21)
2022-06-05 17:55:50 +10:00
Craig Scott
8cf8f4d13b Help: State behavior for add_custom_command(TARGET) without event type
Projects should always have specified one of PRE_BUILD, PRE_LINK or
POST_BUILD, and the documentation has always shown that one must
be given. But the argument parsing logic was such that if none was given,
POST_BUILD would be used and no error or warning would be raised.
Projects may be relying on this behavior, so document it as formally
supported, but not recommended.

Fixes: #23488
2022-06-04 18:35:37 +10:00
Marc Chevrier
be4b9e10af if command: Add PATH_EQUAL operator 2022-06-03 19:31:36 +02:00
Marc Chevrier
4d1883df11 Genex-PATH_EQUAL: path comparison
To complete issue #23498
2022-06-01 15:28:54 +02:00
Marc Chevrier
f11e66670b Genex-PATH: path handling
Fixes: #23498
2022-05-31 15:39:51 +02:00
Brad King
5dcf505f63 Merge topic 'dependency-providers'
2aa83fa15b Dependency providers: Add find_package and FetchContent support
8a28368feb FetchContent: Don't discard non-empty SOURCE_DIR and BINARY_DIR
8ce9bb8a0c FetchContent: Don't leak internal variables
74a6ddc339 cmFindPackageCommand: Handle Makefile variable definitions more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !7276
2022-05-25 07:24:48 -04:00
Craig Scott
2aa83fa15b Dependency providers: Add find_package and FetchContent support
Fixes: #22619
2022-05-25 08:46:18 +10:00
Marc Chevrier
98af010b5c Help: Avoid duplicating registry query syntax in multiple find_* commands
In commit 8d7e80cf3d (find_* commands: add control over Windows registry
views, 2022-04-16) we added documentation that is repeated by multiple
find commands.  Move it to a dedicated manual section to avoid duplication.
2022-05-18 12:43:58 -04:00
Brad King
a7cd15a61c Merge topic 'try_compile-project-platform-vars'
a6562ff579 try_compile: Add option to skip passing platform variables
4843a37676 try_compile: Propagate platform variables in project-mode too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7265
2022-05-17 08:57:55 -04:00
Brad King
a6562ff579 try_compile: Add option to skip passing platform variables
Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell
`try_compile` not to pass platform variables to the test project.

Issue: #23219
2022-05-16 10:47:21 -04:00
Brad King
4843a37676 try_compile: Propagate platform variables in project-mode too
Add policy CMP0137 to propagate both our builtin variables and those
listed by `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` to `try_compile`
whole-project builds.

Inspired-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
Fixes: #23219
2022-05-16 10:39:42 -04:00
Brad King
c4ed5341c4 Merge topic 'CMAKE_PROJECT_TOP_LEVEL_INCLUDES'
a6c34b0353 project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection point
8aa29a1793 CMakeDetermineSystem: Remove unreachable code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7250
2022-05-16 09:26:59 -04:00
Brad King
392e73e01a Merge topic 'doc-install-example-components'
308b698f5d Help: Make install() example component names more consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7240
2022-05-13 08:46:58 -04:00
Craig Scott
a6c34b0353 project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection point
Fixes: #22685
2022-05-13 18:03:36 +10:00
Jean-Christophe Fillion-Robin
308b698f5d Help: Make install() example component names more consistent
This commit updates the documentation so that the component examples are
specified using title case to match convention used in both the existing
`Installing Exports` section and in the "Mastering CMake" book.
2022-05-12 10:15:42 -04:00
Cameron Cawley
33da5824ac OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection.  Add policy CMP0136 to switch to
in place of the old hard-coded default flags.

Fixes: #23178
2022-05-06 10:40:58 -04:00
Craig Scott
c5dff5ace2 Merge topic 'FetchContent_find_package_integration'
29e31e2825 Packages: Integrate FetchContent and find_package()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5688
2022-05-06 08:33:38 -04:00
Brad King
8a40680524 Merge topic 'HelpExit'
0aea13d20b Help: for message(FATAL_ERROR), document nonzero exit code
cc97725137 Help: document exit code of command cmake(1)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7175
2022-05-05 12:51:47 -04:00
Brad King
213f391715 Merge topic 'HelpEnv'
a693da21f3 Help: from command:if, link to environment variables
ab2bdbaf31 Help: Cross-reference ENV operator from cmake-language(7) manual
ee4e728a69 Help: From Environment Variables section, link to cmake -E env etc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7239
2022-05-05 12:50:53 -04:00
Joachim Wuttke (h)
0aea13d20b Help: for message(FATAL_ERROR), document nonzero exit code 2022-05-05 09:43:39 -04:00
Joachim Wuttke (h)
a693da21f3 Help: from command:if, link to environment variables 2022-05-05 09:37:20 -04:00
Brad King
bdaa4b8459 Merge topic 'chsi-windows_registry-updates'
0c33f12a39 cmake_host_system_information(WINDOWS_REGISTRY) updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7229
2022-05-04 11:10:12 -04:00
Craig Scott
29e31e2825 Packages: Integrate FetchContent and find_package()
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.

Fixes: #21687
2022-05-03 16:48:11 +10:00
Marc Chevrier
0c33f12a39 cmake_host_system_information(WINDOWS_REGISTRY) updates
* add a cross-reference in 'get_filename_component()' documentation
* rework tests for better 32bit systems support
2022-05-01 12:57:24 +02:00
Marc Chevrier
8d7e80cf3d find_* commands: add control over Windows registry views
Fixes: #22775
2022-04-29 22:00:02 +02:00
Brad King
1bd85e8f3f Merge topic 'NO_CMAKE_INSTALL_PREFIX'
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7163
2022-04-22 08:59:09 -04:00
Brad King
a0601e346b Merge topic 'find_package_document_global_in_full_signature'
b3e1fcf20a Help: Clarify that find_package GLOBAL argument is supported in full signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7180
2022-04-21 11:51:39 -04:00
Robert Maynard
b3e1fcf20a Help: Clarify that find_package GLOBAL argument is supported in full signature
This was accidentally left out of the docs by commit 2f1ffa003c
(find_package: Add support for default GLOBAL imported targets,
2022-03-10).
2022-04-20 12:38:56 -04:00
Robert Maynard
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX
Fixes #23359
2022-04-15 09:33:55 -04:00
Brad King
1cf59d5267 Merge topic 'file-set-generated-dependency'
d0d09aa29f FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Gabriel Nützi <gnuetzi@gmail.com>
Merge-request: !7173
2022-04-15 08:23:57 -04:00
Kyle Edwards
d0d09aa29f FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystem
If an INTERFACE library has HEADER_SETS, and its header sets contain
files generated by a custom command, the library needs to participate in
the buildsystem so that the files will be generated.

Fixes: #23422
2022-04-14 09:17:54 -04:00
Marc Chevrier
17ff86547e cmake_host_system_information: query windows registry
Fixes: #21240, #23367
2022-04-13 08:59:08 -04:00
Brad King
9a7d8394b1 Merge topic 'header-sets-no-framework'
f779f8c0ad FILE_SET: Forbid adding header sets to Apple FRAMEWORK libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7149
2022-04-07 10:54:30 -04:00
Kyle Edwards
f779f8c0ad FILE_SET: Forbid adding header sets to Apple FRAMEWORK libraries
The feature needs a specialized implementation to place headers
in the right place inside frameworks.  To avoid silently doing
the wrong thing, make this case an error for the 3.23 series.

Issue: #23386
2022-04-07 09:26:58 -04:00
Craig Scott
ce121e486c Merge topic 'doc-install-typo'
7431759ebc Help: Fix typo in install command documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7140
2022-04-04 07:46:55 -04:00
Eugene Shalygin
7431759ebc Help: Fix typo in install command documentation 2022-04-04 07:38:29 +10:00