Commit Graph

58686 Commits

Author SHA1 Message Date
Matthew Woehlke
f2ef60ca54 cmArgumentParser: Ignore positional after keyword
Tweak cmArgumentParser to ignore positional arguments once a keyword
argument has been seen. This prevents mingling of keyword arguments
being able to effectively skip positional arguments, with later
arguments being picked up again; this seems highly likely to lead to
user confusion. This is also consistent with how other languages (e.g.
Python) handle a mix of "named" and positional arguments.
2022-08-17 11:03:51 -04:00
Brad King
5b949bbb91 Merge topic 'refactor-environment-modification'
a5d45e685f Tests: Add case for ENVIRONMENT_MODIFICATION property OP=reset behavior
e2854b4fa2 cmCTestRunTest: Implement the ENVIRONMENT test property with EnvDiff too
bfa1c5285b cmSystemTools: Add EnvDiff class to hold ENVIRONMENT_MODIFICATION logic
a0b1c4ee90 cmCTestRunTest: Simplify by using GetSystemPathlistSeparator
4e6cbb1f13 cmCTestRunTest: Remove unnecessary CMAKE_BOOTSTRAP guard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7572
2022-08-16 13:03:33 -04:00
Brad King
4a82938d60 Merge topic 'nvhpc_fpie_support'
52dc49deb9 NVHPC: Enable PIE support on linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7564
2022-08-16 13:01:31 -04:00
Brad King
47a2eb8fac Merge topic 'tutorial_step1_update'
953d729622 Tutorial: Collapse step 1 solutions
c59e164155 Tutorial: Add Step 1 background info and update style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7497
2022-08-16 12:59:40 -04:00
Brad King
7b1ab24d79 Merge topic 'doc-compiler-id-table'
a8430527f3 Help: `CMAKE_<LANG>_COMPILER_ID` turn code block into table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7567
2022-08-16 12:58:42 -04:00
Brad King
67465ca856 Merge topic 'xcode-avoid-compile-flags-on-resources'
7b2359ac53 Xcode: don't set SKIP_PRECOMPILE_HEADERS when source has no language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7562
2022-08-16 12:50:00 -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
Brad King
6bc20484df Merge branch 'release-3.24' 2022-08-16 12:43:53 -04:00
Brad King
90607d182c Merge topic 'mingw-windres'
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7574
2022-08-16 12:43:53 -04:00
Brad King
d83505b364 Merge topic 'mingw-windres' into release-3.24
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7574
2022-08-16 12:43:52 -04:00
Brad King
5a3a529b2e Merge branch 'release-3.24' 2022-08-16 12:42:21 -04:00
Brad King
ea73a8ea38 Merge topic 'export-no-shdeps'
0ebff0d61a export: Restore exclusion of private shared library dependencies from checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7557
2022-08-16 12:42:21 -04:00
Brad King
349071d6ab Merge topic 'export-no-shdeps' into release-3.24
0ebff0d61a export: Restore exclusion of private shared library dependencies from checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7557
2022-08-16 12:42:20 -04:00
Brad King
db1a284611 Merge branch 'release-3.24' 2022-08-16 12:40:49 -04:00
Brad King
c082c5c167 Merge topic 'automoc-silence-warnings'
844244ccdc automoc: avoid compiler warnings in linker-warning-silencing code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7558
2022-08-16 12:40:48 -04:00
Brad King
5bd618be66 Merge topic 'automoc-silence-warnings' into release-3.24
844244ccdc automoc: avoid compiler warnings in linker-warning-silencing code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7558
2022-08-16 12:40:47 -04:00
Craig Scott
9ce5018be9 Merge branch 'release-3.24' 2022-08-16 06:57:32 -04:00
Craig Scott
69d584378f Merge topic 'doc-warning-as-error'
2c6e379c89 Merge branch 'backport-3.24-doc-warning-as-error' into doc-warning-as-error
bba3ec96b0 Help: A missing cross-reference to --compile-no-warning-as-error
2c1a746343 Merge branch 'backport-3.24-doc-warning-as-error' into doc-warning-as-error
680fe820c6 Help: A missing cross-reference to --compile-no-warning-as-error
7ad89f8fb1 Help: List compiler IDs supported by COMPILE_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7561
2022-08-16 06:57:32 -04:00
Craig Scott
e6038c0199 Merge topic 'doc-warning-as-error' into release-3.24
680fe820c6 Help: A missing cross-reference to --compile-no-warning-as-error
7ad89f8fb1 Help: List compiler IDs supported by COMPILE_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7561
2022-08-16 06:57:31 -04:00
Kitware Robot
ca2f19ca9c CMake Nightly Date Stamp 2022-08-16 00:01:09 -04:00
Alex Reinking
a5d45e685f Tests: Add case for ENVIRONMENT_MODIFICATION property OP=reset behavior
When processing the reset operation in the context of a CTest
`ENVIRONMENT_MODIFICATION` property, the value the variable is reset to
is the one it had after `ENVIRONMENT` was processed, not before.

This was broken once during refactoring and is subtle enough that it
should be tested.
2022-08-15 14:19:21 -04:00
Alex Reinking
e2854b4fa2 cmCTestRunTest: Implement the ENVIRONMENT test property with EnvDiff too
Going through the same internal API for both `ENVIRONMENT` and
`ENVIRONMENT_MODIFICATION` properties will make it easier to implement
checkpointing for `MYVAR=reset:` more efficiently if the need ever
presents itself.  It also makes the two-stage nature of the environment
mutation clearer in the code itself.
2022-08-15 14:19:16 -04:00
Alex Reinking
bfa1c5285b cmSystemTools: Add EnvDiff class to hold ENVIRONMENT_MODIFICATION logic
Prepare to re-use this logic when enhancing `cmake -E env`.
2022-08-15 14:11:47 -04:00
Alex Reinking
a0b1c4ee90 cmCTestRunTest: Simplify by using GetSystemPathlistSeparator
Part of the implementation of `ENVIRONMENT_MODIFICATION` replicated the
logic in this function. Using it here de-duplicates code and will be
useful during the upcoming refactoring.
2022-08-15 14:11:20 -04:00
Alex Reinking
4e6cbb1f13 cmCTestRunTest: Remove unnecessary CMAKE_BOOTSTRAP guard
CTest is not compiled during CMake's `bootstrap` build.
2022-08-15 14:10:34 -04:00
Brad King
e9755bc7c1 MinGW: Restore using windres when toolchain-prefixed name is not available
Since commit 55ba10dcfd (MSYS/MinGW Makefiles: Simplify selection of
windres as Resource Compiler, 2022-05-26, v3.24.0-rc1~82^2) the `MinGW
Makefiles` and `MSYS Makefiles` generators no longer specify the plain
`windres` name for the MinGW resource compiler.  Instead, the name is
specified in our MinGW platform information module. After the change in
commit af4adf6aa9 (MinGW: Fix default windres selection when
cross-compiling, 2020-03-25, v3.18.0-rc1~492^2), when cross-compiling,
we only specify the toolchain-prefixed name of the tool, which may not
be available in all environments.

If the toolchain-prefixed name is not available, fall back to the plain
`windres` name.  We already use this approach for other binutils.

Fixes: #23841
2022-08-15 13:57:58 -04:00
Robert Maynard
52dc49deb9 NVHPC: Enable PIE support on linux 2022-08-15 13:39:30 -04:00
Alex Turbov
a8430527f3 Help: CMAKE_<LANG>_COMPILER_ID turn code block into table 2022-08-15 20:37:25 +04:00
Markus Ferrell
953d729622 Tutorial: Collapse step 1 solutions 2022-08-15 12:06:46 -04:00
Markus Ferrell
c59e164155 Tutorial: Add Step 1 background info and update style 2022-08-15 12:06:34 -04:00
Brad King
4befac3b32 Merge topic 'nvtx3'
cd200c6c2d FindCUDAToolkit: nvtx3 target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7568
2022-08-15 11:26:23 -04:00
Brad King
2c6e379c89 Merge branch 'backport-3.24-doc-warning-as-error' into doc-warning-as-error 2022-08-15 11:09:11 -04:00
Craig Scott
bba3ec96b0 Help: A missing cross-reference to --compile-no-warning-as-error 2022-08-15 11:08:38 -04:00
Brad King
2c1a746343 Merge branch 'backport-3.24-doc-warning-as-error' into doc-warning-as-error 2022-08-15 11:06:59 -04:00
Craig Scott
680fe820c6 Help: A missing cross-reference to --compile-no-warning-as-error 2022-08-15 11:06:51 -04:00
Craig Scott
7ad89f8fb1 Help: List compiler IDs supported by COMPILE_WARNING_AS_ERROR 2022-08-15 11:06:31 -04:00
Brad King
a1dbe7b317 Merge branch 'release-3.24' 2022-08-15 10:51:45 -04:00
Brad King
c5f6d93d5e Merge topic 'warning-as-error-ti-compiler'
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !7560
2022-08-15 10:51:45 -04:00
Brad King
732cad4952 Merge topic 'warning-as-error-ti-compiler' into release-3.24
1cd65dfa0e TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Merge-request: !7560
2022-08-15 10:51:44 -04:00
Brad King
c1285c1fc4 Merge branch 'release-3.24' 2022-08-15 10:48:27 -04:00
Brad King
d0a307ddcf Merge topic 'mingw-flto'
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7559
2022-08-15 10:48:27 -04:00
Brad King
2d08a35b50 Merge topic 'mingw-flto' into release-3.24
7b2a87c2eb IPO: Do not use -flto=auto with GCC 10.x on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7559
2022-08-15 10:48:26 -04:00
Brad King
0ebff0d61a export: Restore exclusion of private shared library dependencies from checks
Refactoring in commit 8c65b7042e (cmExportFileGenerator: Simplify
collection of targets missing from export set, 2022-04-11,
v3.24.0-rc1~281^2) accidentally dropped the behavior change from
commit 0ad2a1c181 (Export: Never treat private link libraries as
public package dependencies., 2013-09-24, v3.0.0-rc1~559^2).
Restore the behavior and add a test.

Fixes: #23838
2022-08-15 10:40:03 -04:00
Kitware Robot
7f2eadafea CMake Nightly Date Stamp 2022-08-15 00:01:27 -04:00
Alex Turbov
0224576995 Help: Replace cmake -P option mentions w/ Sphinx role 2022-08-14 09:58:42 +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