Commit Graph

6073 Commits

Author SHA1 Message Date
Brad King
e53f4e9142 Merge topic 'doctop'
75aedb1204 Help: Clarify PROJECT_IS_TOP_LEVEL behavior w.r.t. add_subdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7362
2022-06-14 12:09:02 -04:00
Michael Hirsch
75aedb1204 Help: Clarify PROJECT_IS_TOP_LEVEL behavior w.r.t. add_subdirectory
Clarify documentation added by commit 2df4badc5f (Help: Note
PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject, 2021-07-05,
v3.21.0-rc3~1^2).

Fixes: #23511
2022-06-14 08:06:02 -04:00
Brad King
9f16821ea5 Merge topic 'fetchcontent-global-targets'
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:58 -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
Brad King
3e0532eb0d Merge topic 'doc-3.24-release-notes-cleanup'
ce0be99b30 Help: Minor cleanups of 3.24 release notes
35ecc6e39b Help: Trivial grammar fixup in LINK_GROUPS genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7342
2022-06-11 05:45:49 -04:00
Craig Scott
ce0be99b30 Help: Minor cleanups of 3.24 release notes 2022-06-10 11:12:20 -04:00
Craig Scott
35ecc6e39b Help: Trivial grammar fixup in LINK_GROUPS genex 2022-06-10 11:12:20 -04:00
Brad King
dfd06aa101 Merge topic 'CheckIPOSupported-honor-flags'
ec08bc1752 CheckIPOSupported: Compile check using flags of calling project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7343
2022-06-10 11:05:44 -04:00
Brad King
99a0f1b1b2 Merge topic 'revert-msvc-compilers-default-to-ZI'
7d73e88d3a MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7344
2022-06-10 10:40:06 -04:00
Brad King
ec08bc1752 CheckIPOSupported: Compile check using flags of calling project
Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the
calling project into the test project.  The set of flags may affect the
availability of IPO support.  Since this may change the result of the
check for existing projects, add a policy for compatibility.

This was discovered after commit 5fcadc481e (MSVC: Default to -ZI
instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to
switch our default for MSVC's debug info flag.  The `-ZI` flag is
incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted
pending future work on an alternative solution.  Re-use the CMP0138
policy number for this change to CheckIPOSupported instead.

Fixes: #23607
2022-06-10 09:12:43 -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
7d73e88d3a MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"
Revert commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86
and x64, 2022-05-24).  The `-ZI` flag is incompatible with the `-GL`
flag used for IPO, and so is not an unconditionally better default.
Revert the change pending future design of a first-class setting for
MSVC debug info format that can be automatically reconciled with IPO
settings.

That commit introduced policy CMP0138, but we already have later policy
numbers used too.  Leave placeholder text to avoid policy renumbering.

Issue: #23607, #10189
2022-06-09 12:24:33 -04:00
Brad King
ea65362f98 Merge topic 'doc-using-deps-guide'
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:14 -04: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
2121fc2de7 Begin post-3.24 development 2022-06-08 12:03:15 -04:00
Brad King
c72f3fca56 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2022-06-08 11:58:33 -04:00
Brad King
868218ea28 Merge topic 'doc-3.24-relnotes'
253941634c Help: Update Sphinx versionadded directives for 3.24 release
a811489b35 Help: Organize and revise 3.24 release notes
a3fc469882 Help: Consolidate 3.24 release notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7338
2022-06-08 11:57:16 -04:00
Brad King
253941634c Help: Update Sphinx versionadded directives for 3.24 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.23.0 --overwrite
2022-06-08 09:07:21 -04:00
Brad King
a811489b35 Help: Organize and revise 3.24 release notes
Add section headers similar to the 3.23 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2022-06-08 09:07:21 -04:00
Dan Walsh
2a37b7fd77 Help: Fix typo with misnamed set_source_files_property() in example 2022-06-08 21:18:26 +10:00
Brad King
a3fc469882 Help: Consolidate 3.24 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.24.rst`.
2022-06-07 15:05:57 -04: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
Brad King
3b371e1dff Merge topic 'help-genex-updates'
6427902713 Help: genex: layout updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7324
2022-06-04 08:12:39 -04: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
6427902713 Help: genex: layout updates
* create section for version comparisons
* move $<LINK_LIBRARY> and $<LINK_GROUP> to "Output-Related Expressions" section
2022-06-03 16:56:58 +02:00
Brad King
bf58164cac Merge topic 'genex-PATH_EQUAL'
4d1883df11 Genex-PATH_EQUAL: path comparison

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7309
2022-06-03 09:44:58 -04:00
Brad King
e6c4af4293 Merge topic 'doc-RULE_LAUNCH_COMPILE'
e281ba27b7 Help: Clarify that RULE_LAUNCH_COMPILE is meant for internal use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7317
2022-06-02 09:33:25 -04:00
Brad King
6e28726122 Merge topic 'doc-preset-versionadded'
5a9c7f76c0 Help: Document CMake version adding each preset version in cmake-presets(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7313
2022-06-02 09:29:29 -04:00
Brad King
dbb6e04b5f Merge topic 'tutorial-cmath'
5c84eca210 Tutorial: Simplify logic checking for cmath functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7314
2022-06-02 09:21:06 -04:00
Craig Scott
e281ba27b7 Help: Clarify that RULE_LAUNCH_COMPILE is meant for internal use
Fixes: #22405
2022-06-02 22:18:17 +10:00
Brad King
5c84eca210 Tutorial: Simplify logic checking for cmath functions
Since commit 07223c5c27 (Tutorial: Update Step 5 to work on Windows,
2020-02-18, v3.18.0-rc1~655^2) the logic does not work on non-Windows
platforms when cmake is re-run on an existing build tree.  It is also
more complicated than we'd like for a tutorial example.  Avoid the need
to consider the `m` library case by performing the check as C++.

Since `check_cxx_symbol_exists` cannot handle overloaded functions
like `exp` and `log`, check with `check_cxx_source_compiles` instead.
This also presents a more general-purpose example in the tutorial.

Fixes: #23524
2022-06-01 13:57:47 -04:00
Brad King
5a9c7f76c0 Help: Document CMake version adding each preset version in cmake-presets(7)
Fixes: #23485
2022-06-01 13:16:48 -04:00
Brad King
18be0f9267 Merge branch 'release-3.22' into release-3.23 2022-06-01 12:03:43 -04:00
Brad King
66cc1ea677 Merge branch 'release-3.22' 2022-06-01 12:03:25 -04:00
Brad King
b243367b36 CMake 3.22.5 2022-06-01 11:15:18 -04:00
Brad King
0ab3cb80fc Merge branch 'release-3.22' into release-3.23 2022-06-01 10:45:37 -04:00
Brad King
a12cc91764 Merge branch 'release-3.21' into release-3.22 2022-06-01 10:45:23 -04:00
Brad King
c14f305396 Merge branch 'release-3.21' 2022-06-01 10:45:01 -04:00
Brad King
97073b1991 CMake 3.21.7 2022-06-01 09:53:26 -04: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
49e31d9c55 Merge topic 'msvc-compilers-default-to-ZI'
5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7295
2022-05-27 09:10:43 -04:00
Brad King
9019537670 MSYS/MinGW Makfiles: Select the compiler occurring first in PATH
Extend the change from commit e01990999a (Ninja: On Windows, select the
compiler occurring first in PATH, 2020-04-17, v3.18.0-rc1~291^2) to
apply to the MSYS/MinGW Makefiles generators too.  Drop the implied
`gcc` and `g++` default compilers.  This allows MinGW/Clang environments
to work out of the box.

Inspired-by: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
Fixes: #23542
2022-05-26 13:22:58 -04:00
Brad King
d45b4f59a4 Merge topic 'verify-interface-header-sets-list'
aadaac7f6d VERIFY_INTERFACE_HEADER_SETS: Add property for list of header sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7298
2022-05-26 09:12:21 -04:00
Glen Chung
5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64
Add a policy for compatibility.

For more information, see [1].

[1] https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170

Fixes: #10189
2022-05-26 09:06:01 -04:00
Brad King
711496b672 Merge topic 'LLVMFlang-compiler'
85749766df LLVMFlang: Add support for LLVM Flang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7246
2022-05-26 08:52:02 -04:00
Kyle Edwards
aadaac7f6d VERIFY_INTERFACE_HEADER_SETS: Add property for list of header sets
Add a new property, INTERFACE_HEADER_SETS_TO_VERIFY, which contains
a list of header sets that should be verified by
VERIFY_INTERFACE_HEADER_SETS.

Fixes: #23522
2022-05-25 14:37:27 -04:00