Commit Graph

32760 Commits

Author SHA1 Message Date
Brad King
9274bdff27 Merge topic 'find_package-one-more-path'
19366408fe cmFindPackageCommand: Protect overrides of `cmDirectoryListGenerator`
e55c154c5b cmFindPackageCommand: Add one more search path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7542
2022-08-05 08:53:09 -04:00
Kitware Robot
ba2a9fb765 CMake Nightly Date Stamp 2022-08-05 00:01:13 -04:00
Alex Turbov
19366408fe cmFindPackageCommand: Protect overrides of cmDirectoryListGenerator
Move virtual function overrides into a protected section of class.
2022-08-04 09:41:59 -04:00
Alex Turbov
e55c154c5b cmFindPackageCommand: Add one more search path
The `PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/(Foo|foo|FOO).*/` search
path is the similar to the one already exists
`PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/`.
2022-08-04 09:41:59 -04:00
Brad King
f05ec53112 Merge topic 'cmake-preset-error-reporting'
47929ee98c presets: Add basic error forwarding from cmake preset json parser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7495
2022-08-04 09:38:34 -04:00
Brad King
0104fec300 Merge topic 'makefile-path-consistency'
5e0b06fe84 Makefiles: Restore path consistency in the global dispatch makefile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7543
2022-08-04 09:35:50 -04:00
Kitware Robot
365613d98b CMake Nightly Date Stamp 2022-08-04 00:01:12 -04:00
Brad King
5e0b06fe84 Makefiles: Restore path consistency in the global dispatch makefile
Directory-level rules in `CMakeFiles/Makefile2` were previously
previously written by each directory's local generator using its own
decision for using relative or absolute paths.

Since commit d33b12d84b (Add support for build tree symlink inside
source tree, 2022-02-25, v3.24.0-rc1~583^2), each local generator
explicitly models the relationship between its source and build paths,
and uses this to determine when it is safe to use relative paths.
Because `add_subdirectory` supports arbitrary placement of the source
and build directories, different local generators may have different
relationships between their source and build paths.  This can cause
disagreement among rules written to `CMakeFiles/Makefile2`.

Restore consistency by always using the root local generator to write
rules to `CMakeFiles/Makefile2`.  Relative paths should always be
expressed w.r.t. the top-level build directory since that is the working
directory in which the `make` tool processing the file will run.

Fixes: #23814
2022-08-03 14:58:47 -04:00
Sankhesh Jhaveri
47929ee98c presets: Add basic error forwarding from cmake preset json parser
Print errors only if there are errors.  Add filename for better
introspection, particularly for FileNotFound errors with presets.
2022-08-03 10:20:04 -04:00
Kyle Edwards
e7bfd0ac7a Merge topic 'all-verify-interface-header-sets'
83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7536
2022-08-03 09:58:43 -04:00
Brad King
f8f8b8e60e Merge topic 'try_compile-cleanup'
6b427d8da9 cmCoreTryCompile: Port to cmArgumentParser
067ba3a2bd cmCoreTryCompile: Move target type selection logic to try_compile
781e1b191a cmCoreTryCompile: Simplify TryCompileCode return type
3218ea60de Tests: Add RunCMake.try_compile case for try_run-only args
b8e551ed32 Tests: Add RunCMake.try_run cases for missing keyword arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7531
2022-08-03 09:47:22 -04:00
Brad King
e2112b3778 Merge topic 'cpp-named-module-support-msvc'
4f95e6b284 ci: test BMI exporting and installation with GCC in CI
c49d5f137b RunCMake/CXXModules: add a "deep-chain" test
297e0f4dce cmCxxModuleMapper: support MSVC module map format
b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
a43713d615 CTestCustom: ignore `cm::optional` uninitialized memory false positive
b90de0b492 RunCMake/CXXModules: support MSVC extensions
a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
d7f5064ff7 cmScanDepFormat: support P1689R5
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7481
2022-08-03 09:45:15 -04:00
Brad King
f6917a2f1f Merge topic 'cuda_add_lto_support'
96bc59b1ca CUDA: Add Device LTO support for nvcc
1527d48cd0 CheckIPO: Refactor logic selecting test source files
4a552ab4ad remove unused variables
6eda92d037 remove unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7389
2022-08-03 09:42:17 -04:00
Brad King
79d7dab1f7 Merge topic 'find_package-refactor-path-generation'
2f69c0233c cmFindPackageCommand: Optimize the last calls to `TryGeneratedPaths`
076a4b44b0 cmFindPackageCommand: Path generators are actually reusable
664abd486f cmFindPackageCommand: Better names for template parameters
c862797a40 cmFindPackageCommand: Rename some generators
fdd14b1744 cmFindPackageCommand: Deduplicate directory listing code
08e7fb3cfa cmFindPackageCommand: Compile-time path generator expressions
61eb5d4de5 cmFindPackageCommand: Avoid friendship between command class and generator
ef62f213f8 cmFindPackageCommand: Drop dead code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7445
2022-08-03 09:39:48 -04:00
Kyle Edwards
83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all
Fixes: #23802
2022-08-03 08:19:08 -04:00
Kitware Robot
e170549eb6 CMake Nightly Date Stamp 2022-08-03 00:01:11 -04:00
Brad King
6b427d8da9 cmCoreTryCompile: Port to cmArgumentParser 2022-08-02 12:54:56 -04:00
Ben Boeckel
297e0f4dce cmCxxModuleMapper: support MSVC module map format
THis is a set of flags stored in a response file which informs the
compiler about where to place output BMI files as well as find the
required BMIs.
2022-08-02 10:53:38 -04:00
Ben Boeckel
b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
MSVC needs the transitive closure of module usage to compile.
2022-08-02 10:53:38 -04:00
Ben Boeckel
a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
At least until 17.4 is out.
2022-08-02 10:53:38 -04:00
Alex Turbov
2f69c0233c cmFindPackageCommand: Optimize the last calls to TryGeneratedPaths 2022-08-02 09:46:52 -04:00
Alex Turbov
076a4b44b0 cmFindPackageCommand: Path generators are actually reusable 2022-08-02 09:46:52 -04:00
Alex Turbov
664abd486f cmFindPackageCommand: Better names for template parameters 2022-08-02 09:46:52 -04:00
Alex Turbov
c862797a40 cmFindPackageCommand: Rename some generators
The point is that `cmFileListBlahBlahGenerator` actually "generate"
directory names and never files.

The `cmBlahBlahStringGenerators` produce paths in fact. Ok, paths
nowadays are also strings but...
2022-08-02 09:46:52 -04:00
Alex Turbov
fdd14b1744 cmFindPackageCommand: Deduplicate directory listing code
The `cmFileListGeneratorProject` and `cmFileListGeneratorMacProject`
was look very similar 'cept few lines.

Now they have a base class and the generator-specific logic has moved
to overrides.
2022-08-02 09:46:52 -04:00
Alex Turbov
08e7fb3cfa cmFindPackageCommand: Compile-time path generator expressions
Original code had path generators built at run-time using a linked list
of dynamically allocated nodes each of which was responsible to generate
a path segment.

However, the combination of used generators is totally well known at
compile time.
2022-08-02 09:46:48 -04:00
Brad King
a3cd71af65 Merge topic 'cmgeneratedfs-absolute-paths'
b02ef99fea cmGeneratedFileStream: Use absolute paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7524
2022-08-02 09:31:54 -04:00
Brad King
5889e5c0eb Merge topic 'vs-msbuild-arm64'
c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7525
2022-08-02 09:30:04 -04:00
Brad King
e18fb0c73e Merge topic 'vs-msbuild-arm64' into release-3.24
c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7525
2022-08-02 09:30:03 -04:00
Brad King
621ea848b0 Merge topic 'windows-symlink-dir'
a4f1c0fac8 Windows: Revert "Prefer junctions for directory symlinks"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7530
2022-08-02 09:28:49 -04:00
Brad King
067ba3a2bd cmCoreTryCompile: Move target type selection logic to try_compile
This is specific to `try_compile` since `try_run` always needs an
executable.  Move the logic out of the common code path.
2022-08-02 08:04:21 -04:00
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
Kitware Robot
8af9dea833 CMake Nightly Date Stamp 2022-08-02 00:01:12 -04:00
Brad King
a4f1c0fac8 Windows: Revert "Prefer junctions for directory symlinks"
Revert commit 5101d586c4 (Windows: Prefer junctions for directory
symlinks, 2022-02-22, v3.24.0-rc1~575^2).  Junctions do not support
`../` and other non-canonical paths.  Revert their use pending further
investigation.

Fixes: #23781
Issue: #23257
2022-08-01 10:59:20 -04:00
Martin Duffy
b02ef99fea cmGeneratedFileStream: Use absolute paths
Use absolute paths in cmGeneratedFileStream to ensure output can be found
if the working directory changes.

Fixes: #23784
2022-08-01 10:23:55 -04:00
Anton Lapounov
c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary
Use the 64-bit registry view when we check whether Windows
has the ARM64 version of the .NET Framework 4.x installed.

Issue: #23755
2022-08-01 10:16:14 -04:00
Kitware Robot
15ebbe9163 CMake Nightly Date Stamp 2022-08-01 00:01:12 -04:00
Kitware Robot
57ccad0001 CMake Nightly Date Stamp 2022-07-31 00:01:06 -04:00
Kitware Robot
cb964caeba CMake Nightly Date Stamp 2022-07-30 00:01:11 -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
5ead1d0a25 CMake 3.24.0-rc5 2022-07-28 13:19:49 -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
12830cc2a9 Merge topic 'verify-interface-header-sets-interface-library-source-language' into release-3.24
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:09 -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
75647fc53d Merge topic 'verify-interface-header-sets-add-compile-definitions' into release-3.24
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:18 -04:00