Commit Graph

33403 Commits

Author SHA1 Message Date
Kitware Robot 51f5ed0a7a CMake Nightly Date Stamp 2022-12-08 00:01:11 -05:00
Brad King 127fa54808 Merge topic 'vs-dotnet-sdk-xaml-resx'
c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7991
2022-12-07 08:20:46 -05:00
Brad King 3b4337adc7 Merge topic 'clang-tidy-export-fixes-dir'
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7982
2022-12-07 08:19:53 -05:00
Brad King 6bae244ad2 Merge topic 'cmstrcat-any-rvalue-arg'
1cca051470 cmStrCat(): allow any argument to be an rvalue string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7993
2022-12-07 08:19:08 -05:00
Brad King e544f2427d Merge topic 'stop_parsing_after_first_script_arg'
08aa516880 cmake: Stop parsing after `--` when detecting script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7992
2022-12-07 08:17:14 -05:00
Kitware Robot 68f8a01802 CMake Nightly Date Stamp 2022-12-07 00:01:10 -05:00
Kyle Edwards 1cca051470 cmStrCat(): allow any argument to be an rvalue string
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
2022-12-06 13:54:42 -05:00
Robert Maynard 08aa516880 cmake: Stop parsing after -- when detecting script mode
Fixes #24220
2022-12-06 13:04:31 -05:00
Kyle Edwards 232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
2022-12-06 10:39:29 -05:00
Quentin Berthet c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects
Improve parity with classic MSBuild projects.

Fixes: #23415
2022-12-06 15:42:23 +01:00
Brad King aeac9b4660 Merge topic 'automoc-case-change'
318ec07560 automoc: Remove existing output file before invoking moc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7985
2022-12-06 08:10:03 -05:00
Brad King f1f064b7b2 Merge topic 'cxx-module-map-clang'
2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules
abd42e9cfc ci: add a Docker container for clang support of C++20 modules
51093f3002 Clang-FindBinUtils: also find `clang-scan-deps`
0b333de923 ci: add C++ module rules file for Clang
21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format
9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes
9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7978
2022-12-06 08:04:18 -05:00
Kitware Robot 85d89ca885 CMake Nightly Date Stamp 2022-12-06 00:01:09 -05:00
Brad King e0a35098bb Merge topic 'ArgumentFlags-function-args'
466f9b886d cmTargetPropCommandBase::HandleArguments: flags must be OR'able

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7983
2022-12-05 12:58:57 -05:00
Brad King 7006ca9190 Merge topic 'find_library-arch-unknown'
e7f78309e7 find_library: Construct paths by removing 'unknown' from library arch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7921
2022-12-05 12:57:11 -05:00
Brad King 5b1150e0e7 Merge topic 'link-options-cache'
7c63372c22 cmGeneratorTarget: Fix regression in CUDA device link options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7981
2022-12-05 12:55:50 -05:00
Kitware Robot 03da25a44a CMake Nightly Date Stamp 2022-12-05 00:01:22 -05:00
Jason Haslam 318ec07560 automoc: Remove existing output file before invoking moc
Remove the output file before invoking moc in case the case of source file has
changed on disk. Recent versions of clang warn when the case of the include
directive (which does change) doesn't match the case of the file on disk.
2022-12-04 19:56:00 -07:00
Kitware Robot 2e3ae48819 CMake Nightly Date Stamp 2022-12-04 00:01:16 -05:00
Craig Scott 466f9b886d cmTargetPropCommandBase::HandleArguments: flags must be OR'able
The flags argument is intended to support multiple flags from the
ArgumentFlags enum. Therefore, flags cannot be of enum type, it
must be an integral type that allows flags to be OR'ed together.
Update the one call site that was erroneously OR'ing multiple values
but then casting that to an ArgumentFlags, which could result in
passing a technically invalid value.

Amends: dd3482f675 (cmTargetPropCommandBase: Restore
ArgumentFlags enum value bool logic, 2022-11-27)
2022-12-03 22:25:57 +11:00
Kitware Robot 3d019b4133 CMake Nightly Date Stamp 2022-12-03 00:01:17 -05:00
Ben Boeckel 21b9fb1e8c cmCxxModuleMapper: support the clang module map format 2022-12-02 13:01:21 -05:00
Ben Boeckel 9c66224668 cmNinjaTargetGenerator: skip setting depfile for none scantypes
The `clang` mechanism does not support `depfile` discovered dependencies
at the moment.
2022-12-02 13:01:13 -05:00
Brad King 7c63372c22 cmGeneratorTarget: Fix regression in CUDA device link options
Since commit f69d1872db (cmGeneratorTarget: Add caches to some
functions, 2022-11-23) we cache the computed link options for a target.
Cache the host and device link options separately.
2022-12-02 11:04:16 -05:00
Brad King 7ea665b74d Merge topic 'file-GET_RUNTIME_DEPENDENCIES-transitive-rpath'
136622a2b2 file(GET_RUNTIME_DEPENDENCIES): propagate transitive parent's rpath
4aa3149c67 Tests: Simplify RunCMake.file-GET_RUNTIME_DEPENDENCIES case cleaning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7968
2022-12-02 09:01:51 -05:00
Alex Lapenkou 136622a2b2 file(GET_RUNTIME_DEPENDENCIES): propagate transitive parent's rpath
This fixes incorrect runtime dependency resolution when the dependency
is located in rpaths of a transitive parent.  Instead of supplying only
the rpaths of the immediate parent, it combines the rpaths of all
transitive parents and passes them down.

Fixes: #24172
2022-12-02 09:00:06 -05:00
Brad King 399d62db8b Merge topic 'cxxmodules-vs'
52c21cbbda ci: enable C++20 module testing with the VS 2022 generator
2991e92ea7 cmExperimental: recycle C++20 module support UUID
82833fb3c0 Help/dev/experimental: document C++20 module limitations
388acfd46d Tests/RunCMake/CXXModules: add support for Visual Studio
069a32b03c Tests/RunCMake/CXXModules: split out collation-requiring tests
ef03a3a2f5 Tests/RunCMake/CXXModules: factor out generator support detection
736123464f Tests/RunCMake/CXXModules: update `NoDyndepSupport` for VS2019 and older
4a4ce031cd Tests/RunCMake/CXXModules: catch VS circular error message
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7972
2022-12-02 08:24:05 -05:00
Kitware Robot b6a84d7cc1 CMake Nightly Date Stamp 2022-12-02 00:01:10 -05:00
Ben Boeckel 9123a0991f cmNinjaTargetGenerator: use .clear() to empty out some strings 2022-12-01 22:21:42 -05:00
Nemanja Ivanovic e7f78309e7 find_library: Construct paths by removing 'unknown' from library arch
The compiler used for a build sometimes disagrees with
the remainder of the toolchain wrt. to the architecture
triple. Specifically, Clang will typically put its
libraries in `<arch>-unknown-<os>-<env>` but it uses
the GCC toolchain on many targets (which often has
its libraries in `<arch>-<os>-<env>`). In such cases
CMake will acquire the triple from Clang and use it
in library search paths for libraries that are provided
by the GCC toolchain. This of course fails due to the
mismatch.

This patch augments the list of search paths with ones
that include the architecture triple with any occurrences
of 'unknown' removed.

Fixes: #24175
2022-12-01 17:55:39 -05:00
Ben Boeckel 2991e92ea7 cmExperimental: recycle C++20 module support UUID
Visual Studio support warrants a new ID.
2022-12-01 11:42:46 -05:00
Ben Boeckel f0899e46fb cmVisualStudio10TargetGenerator: write C++ module elements 2022-12-01 08:33:43 -05:00
Ben Boeckel b0283aaa7c cmVisualStudio10TargetGenerator: ask the generator for dyndep support 2022-12-01 08:33:43 -05:00
Ben Boeckel 9ee7ee1fc2 cmGlobalVisualStudioVersionedGenerator: check for C++ module support 2022-12-01 08:33:43 -05:00
Ben Boeckel fce359c5de cmGlobalVisualStudioVersionedGenerator: support dyndep in VS2022 and up 2022-12-01 08:33:43 -05:00
Ben Boeckel 5b16a0e568 cmGlobalVisualStudio7Generator: make SupportsCxxModuleDyndep protected
The generator target will want to ask this question when determining
whether C++ modules are supported or not.
2022-12-01 08:33:43 -05:00
Brad King 4f9ec5a9be Merge topic 'cxxmodules-collation-logic-refactor'
f4a17b29d3 cmDyndepCollation: factor out metadata writing for dyndep
2f93a272d0 cmDyndepCollation: factor out parsing dyndep information
3fc2de5c74 cmDyndepCollation: factor out writing C++ module info from Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7971
2022-12-01 08:05:21 -05:00
Brad King 907402b147 Merge topic 'cmstrcat-move-first-arg'
beba50bd61 cmStrCat(): optimize when first argument is an rvalue string
d6f2a7ab4b cmStringCommand: remove use of cmCatViews()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7969
2022-12-01 07:58:05 -05:00
Kitware Robot e8faf52223 CMake Nightly Date Stamp 2022-12-01 00:01:09 -05:00
Ben Boeckel f4a17b29d3 cmDyndepCollation: factor out metadata writing for dyndep 2022-11-30 10:53:45 -05:00
Ben Boeckel 2f93a272d0 cmDyndepCollation: factor out parsing dyndep information 2022-11-30 10:53:45 -05:00
Ben Boeckel 3fc2de5c74 cmDyndepCollation: factor out writing C++ module info from Ninja
To facilitate other generators being able to build C++20 modules, start
pulling out collator logic into a generator-agnostic location.

This commit starts by factoring out the information written to the
"target depend info" object consumed during the build to handle writing
out export and installation scripts expected during those steps.
2022-11-30 10:53:45 -05:00
Brad King e15d9f51db Merge topic 'fortran-regression'
a67da2ef66 Tests/FortranModules: add case for modules after "end interface X"
88fb1980c3 Fortran: Restore support for parsing "end interface X"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7966
2022-11-30 08:55:59 -05:00
Brad King d340fcdbb7 Merge topic 'vs-clang-tidy-cleanup'
66ca5b6137 clang-tidy: fix `readability-redundant-smartptr-get` lints
32c38a269a clang-tidy: fix `modernize-make-unique` lints
4a960f7186 clang-tidy: fix `performance-for-range-copy` lints
fc9b5193e4 clang-tidy: fix `readability-redundant-string-init` lints
ccb5ecac0b clang-tidy: fix `readability-const-return-type` lints
2381634e7f clang-tidy: fix `readability-qualified-auto` lints
707172c66e clang-tidy: fix `readability-use-anyofallof` lints
501408338a clang-tidy: fix `readability-isolate-declaration` lints
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7950
2022-11-30 07:29:01 -05:00
Brad King 3b19541518 Merge topic 'add-generator-target-caches'
f69d1872db cmGeneratorTarget: Add caches to some functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7952
2022-11-30 07:28:12 -05:00
Brad King 88fb1980c3 Fortran: Restore support for parsing "end interface X"
Since commit 219a9b1e14 (Fortran: Fix suprious dependencies with
submodules, 2022-07-30, v3.25.0-rc1~327^2) we accidentally fail to
recognize `end interface X`, causing all subsequent modules to be seen
as an interface.

Fixes: #24203
2022-11-30 06:38:36 -05:00
Kyle Edwards beba50bd61 cmStrCat(): optimize when first argument is an rvalue string 2022-11-30 00:05:09 -05:00
Kitware Robot 7fd4238149 CMake Nightly Date Stamp 2022-11-30 00:01:11 -05:00
Kyle Edwards d6f2a7ab4b cmStringCommand: remove use of cmCatViews() 2022-11-29 17:32:41 -05:00
Ben Boeckel 66ca5b6137 clang-tidy: fix readability-redundant-smartptr-get lints 2022-11-29 12:39:46 -05:00