Commit Graph

2133 Commits

Author SHA1 Message Date
Brad King
01e95efc34 Merge topic 'cmake-presets-package'
a8d73085f4 CPack: Add support for presets
b699610df4 cmCMakePresetsGraph: Add package presets
215b9148eb CMakePresets.json: Fix formatting of --list-presets=all

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7621
2022-09-02 09:04:13 -04:00
Brad King
18a8aa079c Merge topic 'E-capabilities-tls'
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7593
2022-09-02 09:01:51 -04:00
Kyle Edwards
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled
Fixes: #20507
2022-09-01 11:20:14 -04:00
Kyle Edwards
a8d73085f4 CPack: Add support for presets
Fixes: #23117
2022-08-31 11:56:21 -04:00
Brad King
fc4451dd31 Merge topic 'xcode-add-gpu-validation-and-default-configuration'
740bee97bd Xcode: Add settings to control a scheme's launch configuration
39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values
4034272ed8 gitignore: Tell Git to ignore the .cache/ directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7581
2022-08-31 09:43:50 -04:00
Brad King
f7fc864c3a Merge topic 'FindOpenSP-module'
e706da5f7e FindOpenSP: Add module to find the OpenSP library
4bcdf1b992 ci: add OpenSP to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7470
2022-08-31 09:42:07 -04:00
Brad King
aa7316a358 Merge topic 'doc-CMP0134-fixes'
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7620
2022-08-31 09:37:46 -04:00
Craig Scott
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs 2022-08-30 15:11:09 -04:00
Dawid Wróbel
e706da5f7e FindOpenSP: Add module to find the OpenSP library
OpenSP has not seen a release in seventeen years, so is unlikely to ever
provide a CMake package configuration file.  Add a find module instead.
2022-08-30 13:55:07 -04:00
PatriceJiang
740bee97bd Xcode: Add settings to control a scheme's launch configuration 2022-08-30 10:28:27 -04:00
PatriceJiang
39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values 2022-08-30 10:26:48 -04:00
Kyle Edwards
b2d07c3297 Help: Clarify that the order of -C and -D arguments matters 2022-08-26 13:55:33 -04:00
Michael Hirsch
302b22450e
Help: $<CONFIG:...> supports multiple configs only since CMake 3.19 2022-08-24 15:29:06 +10:00
Brad King
5936d4f2ad Merge topic 'block-management'
44a2f3f332 Add new flow-control commands for variables and policies scopes management
604993248f cmMakefile::VariablePushPop: helper class to manage variable scopes
3d94ee0e03 cmMakefile::RaiseScope: Add support for cmValue argument
553da0685f cmFunctionBlocker: Add handling of close block without parameters.
02c067dee5 cm::enum_set: fix various bugs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: John Ericson <git@johnericson.me>
Merge-request: !7575
2022-08-23 08:01:18 -04:00
Craig Scott
a8b274c74e Merge topic 'bsd-variables'
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7573
2022-08-22 17:37:49 -04:00
Marc Chevrier
44a2f3f332 Add new flow-control commands for variables and policies scopes management
Add block() and endblock() commands offering the capability to create
new scopes for variables and/or policies.

Fixes: #20171
2022-08-22 16:25:53 +02:00
Cristian Adam
a20d7a9707
BSD: Set *BSD variables when targeting a *BSD system
Fixes: #23853
2022-08-21 09:27:59 +10:00
Brad King
6c7f3c839b Merge topic 'feature/cmake-man-page-short-option-first'
536a25fedc Help: Convenient declaration for `-j, --parallel` option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7588
2022-08-19 07:21:03 -04:00
Brad King
d0a9602aca Merge topic 'doc-var-refs'
159acea394 Help: Clarify that variable references may use cache entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7589
2022-08-19 07:18:34 -04:00
Brad King
159acea394 Help: Clarify that variable references may use cache entries
Clarify in `cmake-language(7)` that a variable lookup may use a cache
entry if the variable is not set.  Fix misleading text in added by
commit 8ba2a8d4a4 (Help: short/long variable reference in if command,
2018-11-01, v3.14.0-rc1~408^2~2).

Fixes: #23863
2022-08-18 09:04:08 -04:00
Alex Turbov
536a25fedc
Help: Convenient declaration for -j, --parallel option 2022-08-18 14:18:49 +04:00
Alex Reinking
c9d70a7cc3 cmake -E env: Add --modify flag
When `cmake -E env` is given the `--modify` flag, try to parse the
following argument as an `ENVIRONMENT_MODIFICATION` operation and apply
it to the environment.

This generalizes `--unset=`:

1.  When implementing `ENVIRONMENT_MODIFICATION` features for other CMake
    commands, the `MYVAR=OP:VALUE` strings do not need to be translated
    to OP-specific flags.
2.  This provides a natural and consistent extension point to introduce
    new operations without introducing very many flags.
3.  Users need to learn only one syntax to access the same functionality.

There is one difference between the behavior here as compared to CTest's
interpretation of the `ENVIRONMENT_MODIFICATION` test property.
The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR`
to whatever its value was when `cmake -E env` launched, rather than try
to checkpoint after plain `MYVAR=VALUE` options.  This makes `MYVAR=VALUE`
and `--modify MYVAR=set:VALUE` semantically equivalent.
2022-08-17 12:54:39 -04:00
Brad King
14aca54c0a Merge topic 'doc-cmake-cli-options'
0224576995 Help: Replace `cmake -P` option mentions w/ Sphinx role
1b94770f27 Help: Insert link to `cmake --toolchain` option
2c54cd871a Help: Turn items of presets manual page into description list
e2198fd9dc Help: Format `-Werror`/`-Wno-error` in the way it can be referenced
a6070b480f Help: Use placeholder instead of listing choices in option lines
8ba20cb56f Help: Simplify `cmake --log-level` option definition
146e4e6bad Help: Split `ctest` options into groups like `cmake` man page has
4c1008d739 Help: Use `:option:` role to reference `ctest` options
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7554
2022-08-16 12:46:26 -04:00
Alex Turbov
1b94770f27 Help: Insert link to cmake --toolchain option 2022-08-14 09:58:42 +04:00
Alex Turbov
2c54cd871a Help: Turn items of presets manual page into description list
It was an ordinal paragraphs (`<p>`) intermixed with blockquote elements.
2022-08-14 09:58:41 +04:00
Alex Turbov
e2198fd9dc Help: Format -Werror/-Wno-error in the way it can be referenced
Replace mentions of these options in the presets manual page.
2022-08-14 09:58:41 +04:00
Alex Turbov
a6070b480f Help: Use placeholder instead of listing choices in option lines
This avoids any ambiguity with whether the choices are literal
values or not. It also makes the option lines more concise.
2022-08-14 09:58:41 +04:00
Alex Turbov
8ba20cb56f Help: Simplify cmake --log-level option definition 2022-08-14 09:58:41 +04:00
Alex Turbov
146e4e6bad Help: Split ctest options into groups like cmake man page has
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2022-08-14 09:58:41 +04:00
Alex Turbov
4c1008d739 Help: Use :option: role to reference ctest options 2022-08-14 09:58:41 +04:00
Alex Turbov
c401fc5dee Help: Simplify optional repeating option
Similar form has already been used in the `ctest -M <mode> [-T <step>]...`
synopsis and looks quite clean w/o extra characters.
2022-08-14 09:58:41 +04:00
Alex Turbov
28ecfd1690 Help: Short options first, then long, then Windows style 2022-08-14 09:58:41 +04:00
Alex Turbov
57f23fa8fc Help: {<…> | <…>}<…|…>
The form of alternative names for "placeholders" has been used already
(e.g., `<file|dir>` in the `cmake(1)` manual).
2022-08-14 09:58:41 +04:00
Alex Turbov
5a20d4c250 Help: Consistent spaces in option args 2022-08-14 09:58:41 +04:00
Alex Turbov
798834ef63 Help: <f><file> for --help* option descriptions 2022-08-14 09:58:41 +04:00
Cristian Adam
62cd3904bf variable: Set LINUX variable on Linux target systems
Fixes: #23840
2022-08-12 07:20:05 +10:00
Craig Scott
ce58311b31 Help: --build-target can be repeated in ctest --build-and-test mode 2022-08-10 16:40:00 +10:00
Alex Turbov
7f4b90a3a6
Help: Fix ctest options description
Missed empty line after `.. option::` and the next paragraph.
2022-08-10 00:46:24 +04:00
Alex Turbov
a6abdf6c8f Help: Consistent options declaration -- short first, then long 2022-08-04 19:34:45 +04:00
Alex Turbov
f4563f05db Help: Value for --graphviz= option actually is mandatory
Before it was `[file]` that AFAIK means optional.
2022-08-04 19:34:45 +04:00
Alex Turbov
04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Alex Turbov
d25b232dee Help: Replace mentions of `-G option with :option:-G` role 2022-08-04 19:34:45 +04:00
Alex Turbov
765d2768f1
Help: Turn some mentions of options into links on executables man page 2022-08-04 19:32:56 +04:00
Alex Turbov
8ffc5e1bbb
Help: Use option directive for the executables manual pages
It'll allow to refer to a particular option of any executable.

There are two "fake" programs added for the CMake script mode (`cmake_P`)
and CMake CLI Tool mode (`cmake_E`).
2022-08-04 19:15:06 +04:00
Brad King
b0273dc26f Merge topic 'find-sdl_gfx'
13aee97207 FindSDL_gfx: Add module to find another SDL component
1279131a8e FindSDL_*: Drop module history from public documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7475
2022-07-28 08:13:53 -04:00
Xavier Del Campo Romero
13aee97207 FindSDL_gfx: Add module to find another SDL component
Complement the several existing `FindSDL_*` modules.
Follow the pattern of the existing `FindSDL_mixer` module.

Fixes: #12004
2022-07-27 15:30:33 -04:00
Craig Scott
34329ee8a3 Merge topic 'doc-path-genex-corrections'
c7ab76e0ff Help: Fix wrong syntax for $<PATH:REPLACE_EXTENSION,...>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7505
2022-07-25 08:03:19 -04:00
Craig Scott
c7ab76e0ff Help: Fix wrong syntax for $<PATH:REPLACE_EXTENSION,...> 2022-07-24 17:11:58 +10:00
Brad King
25ecf6dbed Merge topic 'doc-restructure-genex-manual'
d6af935467 Help: Add Whitespace And Quoting section to genex manual
044c22e121 Help: Restructure reference sections of genex manual
3666486c28 Help: Move reference content to its own section at end of genex manual
22f8a626c3 Help: Add missing versionadded for CUDA genexes
c57c3dbbec Help: Genex manual typo, grammar, formatting, wording fixes
2b102438f8 Help: Boolean genex conditions must evaluate to 1 or 0
d2cb36861f Help: Fix cross-references in genex manual that linked to wrong genexes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7479
2022-07-20 08:44:59 -04:00
Craig Scott
d6af935467 Help: Add Whitespace And Quoting section to genex manual 2022-07-19 21:13:54 +10:00
Craig Scott
044c22e121 Help: Restructure reference sections of genex manual
As part of the general restructuring, also move the notes of a more
introductory nature out of what was the "String-Valued Generator
Expressions" section and up to the dedicated Introduction. This gives
the reader a bit more of a foundation before they get to the heavier
detail of the reference section.
2022-07-19 21:13:52 +10:00
Craig Scott
3666486c28 Help: Move reference content to its own section at end of genex manual
This involves moving the Debugging section up to just after the
introduction. The content of that section is unchanged.
The reference section then follows, and since it is a dedicated
section, all existing sections thereunder were demoted one level.

Move the note about deviating from the usual CMake docs convention
of using angle brackets around placeholders out of the Introduction
and to the start of the reference section. No placeholders are used
before that point, so that content no longer belongs in the introduction.
Apply some minor wording cleanup to the content in the Introduction
that remained.
2022-07-19 21:11:27 +10:00
Craig Scott
22f8a626c3 Help: Add missing versionadded for CUDA genexes 2022-07-19 17:25:23 +10:00
Craig Scott
c57c3dbbec Help: Genex manual typo, grammar, formatting, wording fixes 2022-07-19 16:45:04 +10:00
Craig Scott
2b102438f8 Help: Boolean genex conditions must evaluate to 1 or 0 2022-07-19 16:04:56 +10:00
Craig Scott
d2cb36861f Help: Fix cross-references in genex manual that linked to wrong genexes 2022-07-19 14:18:01 +10:00
Brad King
24631689f0 Merge topic 'genex-LINK_LIBRARY-check-supported-properties'
913ea78d7a Genex LINK_LIBRARY and LINK_GROUP: check supported properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7454
2022-07-07 09:07:01 -04:00
Marc Chevrier
913ea78d7a Genex LINK_LIBRARY and LINK_GROUP: check supported properties
Refines check for properties supporting these genex.
Enhance error message.

Fixes: #23699
2022-07-06 16:15:43 +02:00
Brad King
3c9f4f8389 Merge topic 'doc-TARGET_FILE-depends'
a4f0321ddc Help: Document $<TARGET_FILE> dependency behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7431
2022-07-05 17:32:27 -04:00
Robert Maynard
a4f0321ddc Help: Document $<TARGET_FILE> dependency behavior
Fixes: #23686
2022-07-05 11:31:23 -04:00
Craig Scott
51dd0d758d Merge topic 'doc-LINK_LIBRARY_genex'
d185f7c0a8 Help: Rework $<LINK_LIBRARY>, $<LINK_GROUP> and related docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7413
2022-07-03 00:50:45 -04:00
Craig Scott
d185f7c0a8 Help: Rework $<LINK_LIBRARY>, $<LINK_GROUP> and related docs
These changes restructure the docs to improve readability and flow,
correct grammar and typos, and fix errors and inconsistencies in
some of the examples.

Fixes: #23684
2022-07-03 14:34:41 +10:00
Alexandru Croitor
23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
The new sub-command writes a string representation of the
current log level to the output variable given to the
sub-command.

Given that the log-level might be set either via the --log-level
command line option or via the CMAKE_MESSAGE_LOG_LEVEL
cache / regular variables, the priority for each of the log level
sources is as follows, with the first one being the highest:
1) --log-level
2) CMAKE_MESSAGE_LOG_LEVEL regular variable
3) CMAKE_MESSAGE_LOG_LEVEL cache variable
4) default log level (STATUS)

Fixes: #23572
2022-06-28 16:03:22 +02:00
Brad King
5d8289116d Merge topic 'vs-compile-batching'
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
a7ebb73929 Help: Improve formatting in VS_NO_COMPILE_BATCHING docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7405
2022-06-23 09:23:56 -04:00
Brad King
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
Extend the change from commit b764c7c273 (VS: Add property to turn off
Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by
adding a variable to initialize the property on every target.

Issue: #23179
Fixes: #23639
2022-06-22 12:07:03 -04:00
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
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
Craig Scott
35ecc6e39b Help: Trivial grammar fixup in LINK_GROUPS genex 2022-06-10 11:12:20 -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
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
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
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
5a9c7f76c0 Help: Document CMake version adding each preset version in cmake-presets(7)
Fixes: #23485
2022-06-01 13:16:48 -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
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
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
Brad King
c6f03a2225 Merge topic 'doc-hip-genex-versionadded'
9f863cbd93 Help: Document when HIP_COMPILER generator expressions were added

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7289
2022-05-24 13:59:28 -04:00
Eisuke Kawashima
9f863cbd93 Help: Document when HIP_COMPILER generator expressions were added
These were added by commit b50bfc8913 (HIP: Add language to CMake,
2020-08-28, v3.21.0-rc1~66^2~4).
2022-05-24 10:23:43 -04:00
Brad King
9daa244e99 Merge topic 'find_item-doc-update'
98af010b5c Help: Avoid duplicating registry query syntax in multiple find_* commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7278
2022-05-19 09:51:26 -04:00
Brad King
758756d1ba Merge topic 'ignore-werror-command-arg'
65f7053d6c COMPILE_WARNING_AS_ERROR: Add command-line option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7268
2022-05-19 09:43:53 -04: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
Martin Duffy
65f7053d6c COMPILE_WARNING_AS_ERROR: Add command-line option
Add command-line option `--compile-no-warning-as-error` to ignore value of
`COMPILE_WARNING_AS_ERROR`.

Issue: #19085
2022-05-18 10:30:30 -04:00
Kyle Edwards
259c265112 VERIFY_HEADER_SETS: Rename to VERIFY_INTERFACE_HEADER_SETS
Issue: #23448
2022-05-18 10:18:40 -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
e00e67cb92 Merge topic 'presets-pathListSep'
ba969ce5fe cmake-presets: add ${pathListSep} macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7234
2022-05-13 08:54:08 -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
Erin Melucci
ba969ce5fe cmake-presets: add ${pathListSep} macro
Fixes: #23282
2022-05-12 10:37:49 -04:00
Brad King
79b64690d9 Merge topic 'werror-property'
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
2022-05-10 10:30:42 -04:00
Martin Duffy
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.

`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.

Supports compiler ids that I could find a relevant flag for.
2022-05-06 12:14:37 -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
Brad King
849ad97d95 Merge topic 'truncation_relnotes'
99cad40172 Help: Document version of ctest(1) adding output truncation mode
a6f2c13727 Help: Add release notes for test-output-truncation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7242
2022-05-06 09:00:26 -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
Brad King
99cad40172 Help: Document version of ctest(1) adding output truncation mode
While at it, fix mode value markup.

Issue: #23206
2022-05-05 12:42:59 -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)
ab2bdbaf31 Help: Cross-reference ENV operator from cmake-language(7) manual 2022-05-05 09:36:23 -04:00
Joachim Wuttke (h)
ee4e728a69 Help: From Environment Variables section, link to cmake -E env etc 2022-05-05 09:35:57 -04:00
Brad King
cd20592c6d Merge topic 'ExternalProject-no-extract-timestamp'
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7137
2022-05-05 09:20:41 -04:00
Kasper Laudrup
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy
Add the option to keep the current filestamps when extracting an
archive in ExternalProject_Add.

Enabling this option makes the behavior consistent with how
ExternalProject_Add is used when checking out code from revision
control instead of an archive.

Fixes: #22746
2022-05-05 09:01:54 +10:00
Craig Scott
c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Joachim Wuttke (h)
cc97725137 Help: document exit code of command cmake(1) 2022-05-04 14:17:01 +02: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
8d7e80cf3d find_* commands: add control over Windows registry views
Fixes: #22775
2022-04-29 22:00:02 +02:00
Brad King
90d5d4285b Merge topic 'doc-genex-REMOVE_DUPLICATES'
484b992f25 Help: Clarify which items are retained by $<REMOVE_DUPLICATES:...>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7217
2022-04-28 09:49:26 -04:00
Brad King
3b31397dc3 Merge topic 'manual-fileset-for-header-only-libraries'
4b25a0d512 Help/manual: Update header-only library example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7198
2022-04-28 09:38:37 -04:00
Craig Scott
484b992f25 Help: Clarify which items are retained by $<REMOVE_DUPLICATES:...> 2022-04-28 11:38:51 +10:00
Martin Duffy
4b25a0d512 Help/manual: Update header-only library example
Use target_sources with a named file set for the header-only library
example in cmake-buildsystem7.

Issue: #23400
2022-04-27 09:32:39 -04:00
Brad King
07a54b2bb2 Merge topic 'target-bundle-dir-name-genex'
997af2e1a6 Genex: Add TARGET_BUNDLE_DIR_NAME
627b2eba6c Help: Make TARGET_BUNDLE[_CONTENT]_DIR examples more precise

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7177
2022-04-26 11:15:47 -04:00
Ben Leadbetter
997af2e1a6 Genex: Add TARGET_BUNDLE_DIR_NAME
Evaluate to the name of the bundle directory for a given bundle target.

Fixes: #23409
2022-04-22 09:23:46 -04:00
Brad King
627b2eba6c Help: Make TARGET_BUNDLE[_CONTENT]_DIR examples more precise
The `TARGET_BUNDLE_DIR` and `TARGET_BUNDLE_CONTENT_DIR` generator
expressions produce absolute paths.  Show them in the examples.

Suggested-by: Ben Leadbetter <ben.leadbetter@native-instruments.com>
2022-04-22 09:22:11 -04: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
722e4d4619 Merge topic 'cpack-dmg-sla'
b760828d3f CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7176
2022-04-20 11:38:15 -04:00
Brad King
ac68695b94 Merge topic 'vs-dotnet-startup-object'
d89af11f89 VS: Add StartupObject property for managed .NET projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7171
2022-04-20 11:35:03 -04:00
Brad King
bfefcd5734 Merge topic 'target-runtime-dlls-doc'
692aacfc72 Help: Remove references to MODULE in $<TARGET_RUNTIME_DLLS> doc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7186
2022-04-20 11:29:10 -04:00
Kyle Edwards
692aacfc72 Help: Remove references to MODULE in $<TARGET_RUNTIME_DLLS> doc 2022-04-19 12:45:22 -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
b760828d3f CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default
Since macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default.  Add a policy to
change the default to off.

Fixes: #22978
2022-04-14 10:14:58 -04:00
Florian Schweiger
d89af11f89 VS: Add StartupObject property for managed .NET projects 2022-04-12 15:35:17 +02:00
Brad King
c508935dad Merge topic 'adsp-platform-and-compilers'
87142bbd5f ADSP: Add dedicated platform module
e9eabb0dcd ADSP: Configure compiler in compiler module
88b38f531a ADSP: Support both VDSP++ and CCES for ADSP compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7123
2022-04-06 12:04:43 -04:00
Chris Wright
87142bbd5f ADSP: Add dedicated platform module 2022-04-04 17:05:09 +01:00
Gregor Jasny
53ca6edd8a xcode: add support for xcconfig files
Fixes: #18420
2022-04-03 22:39:34 +02:00
Brad King
a7b325e203 Merge topic 'verify-header-sets'
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7085
2022-03-30 09:10:25 -04:00
Kyle Edwards
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property
Fixes: #23338
2022-03-29 13:58:27 -04:00
Craig Scott
05e510bf0b CMP0132: Don't set compiler environment variables on first run
When running CMake for the first time in a build tree, for some
generators CMake would set compiler environment variables
like CC, CXX, etc. when the corresponding language is enabled.
That behavior was never documented and can result in different
behavior between the first and subsequent runs. Add a policy
to no longer set those environment variables.

Fixes: #21378
2022-03-29 09:42:59 -04:00
Brad King
25b9fb0b1a Merge topic 'link-interface-direct'
cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex
41a6b4a53b INTERFACE_LINK_LIBRARIES_DIRECT: Honor link dependencies through LINK_ONLY
73337cb383 LINK_LIBRARIES: Evaluate separately for linking and usage requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7107
2022-03-25 09:12:39 -04:00
Brad King
96420a4afd Merge topic 'cmake-fresh'
9f1471739d cmake: Add --fresh option to clear the cache and start from scratch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7099
2022-03-25 09:09:56 -04:00
Brad King
cf312a2e54 LINK_LIBRARIES: Add support for LINK_ONLY genex
Previously we always used content guarded by `$<LINK_ONLY:...>`
in `LINK_LIBRARIES`, even when evaluating for non-linking usage
requirements.  Add a policy to honor `LINK_ONLY` in `LINK_LIBRARIES`
the same way we already do in `INTERFACE_LINK_LIBRARIES`.
2022-03-24 08:23:55 -04:00
Kasper Laudrup
0b7fd783f8 cmake -E tar: Add --touch option
Similar to GNU tar add a --touch option to the tar extract command to
skip extracting the timestamps from the files in the archive
effectively touching them as if they were just created.

Issue: #22746
2022-03-23 14:41:34 +01:00
Brad King
9f1471739d cmake: Add --fresh option to clear the cache and start from scratch
Simplify the workflow to re-run CMake from scratch as if a build tree
were never before processed, regardless of whether it has been.

Fixes: #23119
2022-03-22 09:27:47 -04:00
Brad King
a4b04e62fc Merge topic 'LINK_LIBRARY-WHOLE_ARCHIVE'
dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !7064
2022-03-21 14:35:59 -04:00
Brad King
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch
Revert commit f3ad061858 (Add usage requirements to update direct link
dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage
updates in its predecessor commit 193a999cd5 (cmTarget: Add
INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage,
2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch.

After initial experience using the feature in practice, additional
design considerations have been raised for discussion in the original
issue.  To avoid rushing this for the 3.23 series, we've decided to
revert the feature for now so it can be revised for a future release.

Issue: #22496
2022-03-21 13:17:32 -04:00
Brad King
fccb5a5152 Merge topic 'doc-multiple-src-paths'
1b8669c1d6 Help: Document warning about multiple source paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7082
2022-03-18 08:21:40 -04:00
Brad King
1b8669c1d6 Help: Document warning about multiple source paths
Although passing multiple source paths was never documented, it was not
diagnosed by CMake 3.22 and below.  In CMake 3.23 we now diagnose extra
paths and warn.  Document this change and add a release note.

Issue: #23334
2022-03-18 07:39:22 -04:00
Marc Chevrier
dabe56de58 genex-LINK_LIBRARY: Add feature WHOLE_ARCHIVE 2022-03-17 23:07:59 +01:00
Brad King
7aa1e08bda Merge topic 'doc-src-bld-selection'
fea270d3ed Help: Document cmake source and binary dir selection rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7076
2022-03-17 11:03:12 -04:00
Robert Maynard
fea270d3ed Help: Document cmake source and binary dir selection rules
Co-authored-by: Brad King <brad.king@kitware.com>
2022-03-17 09:38:32 -04:00
Brad King
bc1fd4b606 Merge topic 'doc-list-semicolons'
8abd714176 Help: Clarify that ENVIRONMENT test properties take ;-separated lists
02cf404ace Help: Add advice for dealing with semicolons in lists
c4117d9116 ExternalProject: Document that LIST_SEPARATOR works for CMAKE_ARGS too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7066
2022-03-16 11:14:59 -04:00