Commit Graph

32697 Commits

Author SHA1 Message Date
Brad King
781e1b191a cmCoreTryCompile: Simplify TryCompileCode return type
The return value is only used as a boolean, so use `bool`.
2022-08-02 08:04:20 -04:00
Brad King
514804c8bc Merge topic 'command-arg-parser'
4368a524c6 cmCMakePathCommand: Enforce non-empty string arguments via binding type
7ca8d9f0f8 cmArgumentParser: Model non-empty strings with wrapper type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7512
2022-07-29 07:51:22 -04:00
Brad King
90036769fc Merge topic 'ms-tool-dash-flags'
9dbcfb8fdd MSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7519
2022-07-29 07:50:07 -04:00
Kitware Robot
38479c3f8d CMake Nightly Date Stamp 2022-07-29 00:01:12 -04:00
Brad King
4368a524c6 cmCMakePathCommand: Enforce non-empty string arguments via binding type 2022-07-28 08:25:00 -04:00
Brad King
7ca8d9f0f8 cmArgumentParser: Model non-empty strings with wrapper type
Some clients have been explicitly checking whether the string specified
after a keyword is empty.  Offer them a way to specify that the string
must be non-empty as part of the binding type.
2022-07-28 08:24:47 -04:00
Brad King
110baa254b Merge topic 'command-arg-parser'
236bacc244 cmArgumentParser: Offer bindings for positional arguments
1f2eb63d1c cmArgumentParser: Add callback bindings
f5d2f6076a cmArgumentParser: Generalize expected argument count
078e2aec8f cmArgumentParser: Generalize internal state tracking
77fcb00a2b cmArgumentParser: Propagate constructors through binding wrapper types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7514
2022-07-28 08:15:50 -04:00
Brad King
b6ffca53f8 Merge topic 'verify-interface-header-sets-interface-library-source-language'
41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7517
2022-07-28 08:12:10 -04:00
Brad King
d9cca8e83d Merge topic 'verify-interface-header-sets-add-compile-definitions'
27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets
626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7516
2022-07-28 08:11:19 -04:00
Brad King
a805e53e95 Merge topic 'vs-msbuild-arm64'
418fd85569 VS: Detect ARM64 host architecture at runtime

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tommy Vercetti <tommyvct@outlook.com>
Acked-by: Anton Lapounov <anton.lapounov@microsoft.com>
Merge-request: !7511
2022-07-28 08:08:01 -04:00
Kitware Robot
be4081264a CMake Nightly Date Stamp 2022-07-28 00:01:10 -04:00
Dubach, Joev
9dbcfb8fdd MSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command lines
Fixes: #23772
2022-07-27 16:51:15 -04:00
Kyle Edwards
41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages
If a target doesn't have any source files, fall back to the global
list of enabled languages to determine the language of the header
file to verify.

Fixes: #23774
2022-07-27 13:29:09 -04:00
Kyle Edwards
27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets
Fixes: #23732
2022-07-27 12:25:15 -04:00
Kyle Edwards
626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo() 2022-07-27 12:24:53 -04:00
Brad King
f44b79ad9b Merge topic 'try_compile-cleanup'
e1d4984706 Tests: Add RunCMake.try_compile case covering empty value arguments
6a85813806 Tests: Add RunCMake.try_compile case covering list arguments with no values
7a5b1b6010 cmCoreTryCompile: Select source-file signature project/target names earlier
8b0ee799e4 cmCoreTryCompile: Compute src-file signature build directory earlier
e73c8eaff2 cmTry{Compile,Run}Command: Port away from legacy cmCommand
7ba3a3290f try_compile: Refactor positional arg parsing
31ee3cd49d try_compile: Fail earlier when bindir is not an absolute path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7513
2022-07-27 09:54:40 -04:00
Brad King
e781d92de5 Merge topic 'vs-fuzzer'
feeb9ae4ba VS: Add support for (lib)fuzzer /fsanitize=fuzzer flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7471
2022-07-27 09:53:52 -04:00
Brad King
418fd85569 VS: Detect ARM64 host architecture at runtime
We use the host machine's architecture to select the `MSBuild.exe`
binary variant, and the host toolset architecture.  When CMake is
compiled as `x64` or `x86` it may still run on ARM64 hosts.  Detect the
actual architecture of the host at runtime instead of relying on the
architecture of CMake's own binary.

The `arm64/MSBuild.exe` executable is an ARM64 .NET 4 application, which
requires the ARM64 version of .NET Framework 4.8.1 to be installed on
the machine.  That version is not yet released for Windows 10; however,
the `MSBuild/Current/Bin/arm64` directory is still created when
installing Visual Studio 2022 (a user may upgrade to Windows 11 later).
Use it only if the .NET Framework is installed.

The `amd64/MSBuild.exe` executable cannot run on Windows 10 ARM64,
but can run on Windows 11 ARM64.

Fixes: #23755
2022-07-27 07:40:46 -04:00
Brad King
236bacc244 cmArgumentParser: Offer bindings for positional arguments 2022-07-27 07:03:32 -04:00
Brad King
1f2eb63d1c cmArgumentParser: Add callback bindings 2022-07-27 07:03:32 -04:00
Brad King
f5d2f6076a cmArgumentParser: Generalize expected argument count
Replace the boolean expectation with an integer count.
2022-07-27 07:03:32 -04:00
Brad King
078e2aec8f cmArgumentParser: Generalize internal state tracking
Use a `std::function` to support general actions on value arguments.
2022-07-27 07:03:32 -04:00
Brad King
77fcb00a2b cmArgumentParser: Propagate constructors through binding wrapper types 2022-07-27 07:03:31 -04:00
Kitware Robot
3891b5a06f CMake Nightly Date Stamp 2022-07-27 00:01:07 -04:00
Brad King
7a5b1b6010 cmCoreTryCompile: Select source-file signature project/target names earlier 2022-07-26 15:09:48 -04:00
Brad King
8b0ee799e4 cmCoreTryCompile: Compute src-file signature build directory earlier 2022-07-26 15:09:48 -04:00
Brad King
e73c8eaff2 cmTry{Compile,Run}Command: Port away from legacy cmCommand
Convert the command entry points to free functions.
2022-07-26 15:09:48 -04:00
Brad King
7ba3a3290f try_compile: Refactor positional arg parsing 2022-07-26 14:44:42 -04:00
Brad King
31ee3cd49d try_compile: Fail earlier when bindir is not an absolute path
If the bindir is not an absolute path, other errors occur later.
Fail early with a clear error in this case.
2022-07-26 14:41:28 -04:00
Brad King
5fc4e121a1 Merge topic 'command-arg-parser'
2eba10c5ee cmArgumentParser: Drop unused parsedKeywords argument to Parse()
98cf623821 cmCTestHandlerCommand: Capture list of parsed keywords via binding
6ecd741b5f cmFileCommand: Capture list of parsed keywords via binding
f7e81802f2 cmArgumentParser: Offer binding for list of parsed keywords
f95a5832c7 cmArgumentParser: Drop unused keywordsMissingValue argument to Parse()
9a7efb6813 cmArgumentParser: Offer private binding to cmParseArgumentsCommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7508
2022-07-26 09:27:44 -04:00
Brad King
7afbfcb184 Merge topic 'refactor-win-ver'
ee047a68f2 cmSystemTools: Factor out method to get Windows OS version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7509
2022-07-26 09:24:54 -04:00
Kitware Robot
2d87db1a2f CMake Nightly Date Stamp 2022-07-26 00:01:07 -04:00
Brad King
ee047a68f2 cmSystemTools: Factor out method to get Windows OS version
Factor the implementation out of `cmGlobalGenerator`.
2022-07-25 14:27:24 -04:00
Brad King
2eba10c5ee cmArgumentParser: Drop unused parsedKeywords argument to Parse()
All clients have been ported to use a binding instead.
2022-07-25 13:52:11 -04:00
Brad King
98cf623821 cmCTestHandlerCommand: Capture list of parsed keywords via binding 2022-07-25 13:52:11 -04:00
Brad King
6ecd741b5f cmFileCommand: Capture list of parsed keywords via binding 2022-07-25 13:52:11 -04:00
Brad King
f7e81802f2 cmArgumentParser: Offer binding for list of parsed keywords
Some clients ask for this list in their `Parse()` call.
Offer them a way to express this request as a binding.
2022-07-25 13:52:01 -04:00
Brad King
f95a5832c7 cmArgumentParser: Drop unused keywordsMissingValue argument to Parse()
All clients have been converted to encoding this requirement in their
bindings.
2022-07-25 13:51:43 -04:00
Brad King
9a7efb6813 cmArgumentParser: Offer private binding to cmParseArgumentsCommand
The `keywordsMissingValue` argument to `Parse()` is now needed only for
the `cmake_parse_arguments` result `_KEYWORDS_MISSING_VALUES`.  Offer
its implementation a private binding for this.  Our internal clients can
use `ArgumentParser::NonEmpty<>` and friends to enforce the presence of
values.
2022-07-25 13:48:26 -04:00
Brad King
4f8f577015 Merge topic 'cmake-help-flags-after-dashdash'
14a0e750cb cmake: In -P mode ignore flags like `--version` after `--`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7496
2022-07-25 12:00:39 -04:00
Brad King
7ed8c2de6a Merge topic 'cmake-help-flags-after-dashdash' into release-3.24
14a0e750cb cmake: In -P mode ignore flags like `--version` after `--`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7496
2022-07-25 12:00:38 -04:00
Brad King
cc663a8c1d Merge topic 'cmake-P-path-args'
febe3190f0 Merge branch 'backport-3.23-cmake-P-path-args'
846a650ff7 cmake: In -P mode ignore extra paths on the command line
c362cba566 cmake: simplify to a single source of truth of working mode
261fa5db39 cmake: In -P mode ignore extra paths on the command line
314135cdf1 cmake: simplify to a single source of truth of working mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7494
2022-07-25 11:57:48 -04:00
Brad King
7c9bda81bd Merge topic 'cmake-P-path-args' into release-3.24
febe3190f0 Merge branch 'backport-3.23-cmake-P-path-args'
846a650ff7 cmake: In -P mode ignore extra paths on the command line
c362cba566 cmake: simplify to a single source of truth of working mode
261fa5db39 cmake: In -P mode ignore extra paths on the command line
314135cdf1 cmake: simplify to a single source of truth of working mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7494
2022-07-25 11:57:47 -04:00
Brad King
ec809a80c5 Merge topic 'revert-vs-ZERO_CHECK-proj'
26b724cf2b Merge branch 'backport-3.24-revert-vs-ZERO_CHECK-proj'
289932ded0 VS: Revert "Write ZERO_CHECK.proj for VS19 and above"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7499
2022-07-25 11:56:30 -04:00
Brad King
cba5652a1f Merge topic 'revert-vs-ZERO_CHECK-proj' into release-3.24
289932ded0 VS: Revert "Write ZERO_CHECK.proj for VS19 and above"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7499
2022-07-25 11:56:29 -04:00
Brad King
363e8f8452 Merge topic 'revert-ui-check'
778aaf6fdc AUTOUIC: Revert "Fix internal paths of generated ui_foo.h files"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7498
2022-07-25 11:55:13 -04:00
Brad King
74c2cc630f Merge topic 'update-kwsys'
6d84355274 Merge branch 'upstream-KWSys' into update-kwsys
f98fa3e543 KWSys 2022-07-22 (ac792bf7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7486
2022-07-25 11:54:00 -04:00
Brad King
ea209b9f9d Merge topic 'command-arg-parser-result'
8a18e82e95 cmCMakePathCommand: Report keyword errors via argument parser results
7e4a9afa1a cmCMakeHost*Command: Report keyword errors via argument parser results
74ec6b63c2 cmFileCommand: Report keyword errors via argument parser results
e56108f629 cmExecuteProcessCommand: Report keyword errors via argument parser results
b7c82b26b0 cmArgumentParser: Capture keyword errors in parse results
50876f6b9a cmArgumentParser: Add structure to capture operational results
5955ec1992 cmArgumentParser: Store keyword action map with explicit name
119e1f7fbc cmArgumentParser: Factor out common static/dynamic implementation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7488
2022-07-25 11:52:27 -04:00
Kitware Robot
867be20c80 CMake Nightly Date Stamp 2022-07-25 00:01:13 -04:00
Kitware Robot
0f376bfc5a CMake Nightly Date Stamp 2022-07-24 00:01:05 -04:00