Commit Graph

32831 Commits

Author SHA1 Message Date
Craig Scott bbda95e7bd Merge topic 'file-DOWNLOAD-existing-file-matched-message'
666b3c6f13 Help: Clarify file(DOWNLOAD) behavior for existing file with same hash
87a40b720a file(DOWNLOAD): Fix message for existing file with matching hash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7599
2022-08-26 06:53:46 -04:00
Kitware Robot 71b7458f5b CMake Nightly Date Stamp 2022-08-26 00:01:13 -04:00
Kyle Edwards 2ef64745c8 Merge topic 'file-set-source-group'
970052fedd FILE_SET: Fix source group detection
bcc3965813 Tests: Fix VS10Project SourceGroupTreeCMakeLists check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7609
2022-08-25 09:14:21 -04:00
Kitware Robot 9d1ecd72fb CMake Nightly Date Stamp 2022-08-25 00:01:07 -04:00
Kyle Edwards 970052fedd FILE_SET: Fix source group detection
Call MatchChildrenFiles() instead of MatchesFiles() in order to
account for files being in subgroups of source groups.

Fixes: #23880
2022-08-24 16:07:24 -04:00
Kitware Robot 95dd428d5a CMake Nightly Date Stamp 2022-08-24 00:01:12 -04:00
Michael Hirsch 87a40b720a file(DOWNLOAD): Fix message for existing file with matching hash
file(DOWNLOAD STATUS) docs say the return list is of
length 2. However, when an already downloaded file
hash matches EXPECTED_HASH, the return message had
a semicolon that made the return list length 3.
Adjust the message to no longer contain the extra semicolon
and to more clearly describe the situation.
2022-08-23 22:40:28 +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
Brad King 066b22b371 Merge topic 'target-prop-backtraces'
52c95540b7 target_*: Fix cross-directory call backtraces
0d64c3abd1 Tests: Add FileAPI case for cross-directory target_* commands
ef6a4240ba cmQtAutoGenInitializer: Drop unnecessary argument in AppendProperty call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7602
2022-08-23 07:58:40 -04:00
Kitware Robot 3c1771f5f0 CMake Nightly Date Stamp 2022-08-23 00:01:16 -04:00
Brad King 52c95540b7 target_*: Fix cross-directory call backtraces
Record the call-site backtrace, not the current backtrace of the
target's directory.

Fixes: #23873
2022-08-22 15:29:43 -04:00
Brad King ef6a4240ba cmQtAutoGenInitializer: Drop unnecessary argument in AppendProperty call
Prepare to add another optional argument.
2022-08-22 12:24:40 -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
Marc Chevrier 604993248f cmMakefile::VariablePushPop: helper class to manage variable scopes 2022-08-22 16:25:53 +02:00
Marc Chevrier 3d94ee0e03 cmMakefile::RaiseScope: Add support for cmValue argument 2022-08-22 16:25:53 +02:00
Marc Chevrier 553da0685f cmFunctionBlocker: Add handling of close block without parameters. 2022-08-22 16:25:53 +02:00
Kitware Robot 7f02daba64 CMake Nightly Date Stamp 2022-08-22 00:01:17 -04:00
Kitware Robot b634b8a83b CMake Nightly Date Stamp 2022-08-21 00:01:11 -04:00
Kitware Robot 6fef0a145c CMake Nightly Date Stamp 2022-08-20 00:01:14 -04:00
Brad King 7b9757e507 Merge topic 'cuda_mark_toolkit_includes_as_system'
ea659b155d CUDA: Always mark cuda toolkit as system include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7476
2022-08-19 07:25:00 -04:00
Kitware Robot 26f824f0fa CMake Nightly Date Stamp 2022-08-19 00:01:12 -04:00
Robert Maynard ea659b155d CUDA: Always mark cuda toolkit as system include
Fixes: #23731
2022-08-18 10:37:06 -04:00
Brad King 36d35d4eb1 Merge topic 'cmake-E-env-modify'
c9d70a7cc3 cmake -E env: Add --modify flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7571
2022-08-18 08:04:06 -04:00
Brad King a2cf0db74b Merge topic 'try_compile-no-try_run-args'
b976b844d2 try_compile: Don't accept try_run arguments
24c83bb35b try_compile: Fix quotes in reporting of unknown arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7585
2022-08-18 08:01:02 -04:00
Brad King a336c83520 Merge topic 'argparse-positional-tweak'
f2ef60ca54 cmArgumentParser: Ignore positional after keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7584
2022-08-18 07:58:54 -04:00
Brad King eee5616336 Merge topic 'create_test_sourcelist-special-chars'
f0802b2f50 create_test_sourcelist: Add support for more special characters in paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7587
2022-08-18 07:57:48 -04:00
Kitware Robot b59615e924 CMake Nightly Date Stamp 2022-08-18 00:01:11 -04:00
Matthew Woehlke b976b844d2 try_compile: Don't accept try_run arguments
Modify cmCoreTryCompile to only recognize try_run arguments when
actually parsing try_run. (The old behavior was to recognize try_run
arguments for try_compile also and then complain.)

This has a small chance that a try_run keyword will be consumed as part
of a multi-valued keyword argument. However, this behavior is more
consistent with other commands, as we don't normally treat keywords as
universally reserved. Also, the code is noticeably simplified.
2022-08-17 15:44:35 -04:00
Matthew Woehlke 24c83bb35b try_compile: Fix quotes in reporting of unknown arguments
In commit 6b427d8da9 (cmCoreTryCompile: Port to cmArgumentParser,
2022-08-01) we inadvertently dropped a matching quote during refactoring
of reporting unknown arguments given to try_compile/try_run.  Add the
missing quote to match the old behavior and not have an imbalanced quote
in the warning.
2022-08-17 15:44:29 -04:00
Klaas Speller f0802b2f50 create_test_sourcelist: Add support for more special characters in paths
Use `cmSystemTools::MakeCidentifier` to robustly create a valid function
name to which the test path maps.

Fixes: #23855
2022-08-17 15:34:41 -04:00
Brad King c3793b4157 CMake 3.24.1 2022-08-17 12:54:57 -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
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 b0ab42c120 Merge topic 'fix-xcode-install-path'
61acaa12af xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7473
2022-08-17 08:41:33 -04:00
Kitware Robot eb10bcb9fc CMake Nightly Date Stamp 2022-08-17 00:01:14 -04:00
Tor Arne Vestbø 61acaa12af xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARY
An empty INSTALL_PATH will confuse Xcode, resulting in the archive
action producing archives that can not be uploaded to the App Store.

The logic to pull out a install_name_dir only applies to
SHARED_LIBRARY targets, so we can skip the setting of the
property for all other targets.

There might be cases where the INSTALL_PATH code path will also
end up setting an empty INSTALL_PATH, but it's unclear whether
this is a problem, so to keep the patch minimal the existing
code is left as is.

Fixes: #15183
2022-08-16 13:35:36 -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 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 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 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
Kitware Robot ca2f19ca9c CMake Nightly Date Stamp 2022-08-16 00:01:09 -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 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 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