Commit Graph

6084 Commits

Author SHA1 Message Date
Brad King
8d8957e56d Merge topic 'add_export_no_system'
9680b3b279 Add EXPORT_NO_SYSTEM target property, deprecate IMPORTED_NO_SYSTEM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7379
2022-06-21 10:46:03 -04:00
Brad King
d94e09ec88 Merge topic 'cpp-named-module-file-sets'
07bc3b07ec gitlab-ci: test C++ modules using GCC
1b2270aa4e ci: add a Docker image to test out C++ modules with GCC
8c5a53096a Tests/RunCMake/CXXModules: add module-using examples
4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation
b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format
02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents
a046a45aad cmGlobalNinjaGenerator: add a TODO for header units
386465bf83 cmTarget: add support for C++ module fileset types
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7369
2022-06-17 11:35:12 -04:00
Da Quexian
9680b3b279 Add EXPORT_NO_SYSTEM target property, deprecate IMPORTED_NO_SYSTEM
Issue: #18040

Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-17 22:38:07 +08:00
Ben Boeckel
386465bf83 cmTarget: add support for C++ module fileset types
C++ modules have two variants which are of importance to CMake:

  - `CXX_MODULES`: interface modules (those using `export module M;`,
    `export module M:part;`, or `module M:internal_part;`)
  - `CXX_MODULE_HEADER_UNITS`: importable header units

Creating C++ modules or partitions are *not* supported in any other
source listing. This is because the source files must be installed (so
their scope matters), but not part of usage requirements (what it means
for a module source to be injected into a consumer is not clear at this
moment). Due to the way `FILE_SET` works with scopes, they are a perfect
fit as long as `INTERFACE` is not allowed (which it is not).
2022-06-16 10:28:34 -04:00
Brad King
dd8befd9d3 Merge topic 'add_SYSTEM_prop'
69beee5314 Add SYSTEM target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7308
2022-06-16 09:00:45 -04:00
Brad King
7eddfed10f Merge topic 'xcode-launch-mode'
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7355
2022-06-16 08:59:51 -04:00
Harry Mallon
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control 2022-06-15 19:02:56 +01:00
Da Quexian
69beee5314 Add SYSTEM target property
If it is ON, treat INTERFACE_INCLUDE_DIRECTORIES as system include directories.

Issue: #18040

Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-16 00:25:27 +08:00
Brad King
85dc7c763a Merge topic 'find_item-validation-function'
f3b5a7d6df find_(program,library,file,path): add validation function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7364
2022-06-15 09:59:12 -04:00
Ben Boeckel
ff30a5397d cmExperimental: add an experimental feature to handle C++ modules 2022-06-14 19:27:30 -04:00
Marc Chevrier
f3b5a7d6df find_(program,library,file,path): add validation function
Fixes: #23603
2022-06-14 16:17:46 -04:00
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