Commit Graph

9982 Commits

Author SHA1 Message Date
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
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 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
Ben Boeckel 21b9fb1e8c cmCxxModuleMapper: support the clang module map format 2022-12-02 13:01:21 -05:00
Brad King f8fed12250 Tests: Enable RunCMake.file-GET_RUNTIME_DEPENDENCIES linux cases on XL
These were excluded with the XL and XLClang compilers because one
such compiler in nightly testing hard-codes `--enable-new-dtags`.
Add a way to disable the cases via local configuration instead so that
we can run them on the rest of the XL compilers.
2022-12-02 09:09:38 -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
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 388acfd46d Tests/RunCMake/CXXModules: add support for Visual Studio 2022-12-01 11:42:46 -05:00
Ben Boeckel 069a32b03c Tests/RunCMake/CXXModules: split out collation-requiring tests
Visual Studio does not currently have a place to insert the logic
required to implement this test, so skip it if possible.
2022-12-01 11:42:46 -05:00
Ben Boeckel ef03a3a2f5 Tests/RunCMake/CXXModules: factor out generator support detection
This keeps the condition to a readable limit.
2022-12-01 11:42:46 -05:00
Ben Boeckel 736123464f Tests/RunCMake/CXXModules: update NoDyndepSupport for VS2019 and older 2022-12-01 11:42:46 -05:00
Ben Boeckel 4a4ce031cd Tests/RunCMake/CXXModules: catch VS circular error message 2022-12-01 08:33:43 -05:00
Ben Boeckel 7eb9b45861 Tests/RunCMake/CXXModules: mask scanning checks without control
In Visual Studio, there is no mechanism to tell scanning apart from
non-scanning, so skip the sanity checks.
2022-12-01 08:33:43 -05:00
Brad King 2a139018ce Merge topic 'find_cudatoolkit_avoid_nvhpc_symlinks'
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7974
2022-12-01 08:02:49 -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
Robert Maynard 9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks
Fixes: #24188
2022-11-30 16:39:00 -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
Ben Boeckel a67da2ef66 Tests/FortranModules: add case for modules after "end interface X"
When there is an `end interface X` in a file, subsequent modules should
not be considered part of interface X.

Issue: #24203
2022-11-30 06:39:48 -05:00
Kyle Edwards beba50bd61 cmStrCat(): optimize when first argument is an rvalue string 2022-11-30 00:05:09 -05:00
Brad King 4aa3149c67 Tests: Simplify RunCMake.file-GET_RUNTIME_DEPENDENCIES case cleaning 2022-11-29 17:47:38 -05:00
Marc Chevrier 77d734aede FindPython: add support for Stable ABI
Fixes: #24141
2022-11-29 16:48:08 +01:00
Brad King f72c405d4e Merge topic 'ci-nvhpc'
16a5c36795 gitlab-ci: add nightly job testing NVHPC with Ninja on Linux
9474d02386 Tests: Clarify CudaOnly.SeparateCompilationPTX output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7946
2022-11-29 10:39:40 -05:00
Brad King f6b4923e95 Merge topic 'cuda_tests_support_linux_no_static_libs'
54d8044084 Tests: Don't presume that Linux CUDA Toolkits provide static libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7949
2022-11-29 10:35:07 -05:00
Craig Scott dd3482f675 cmTargetPropCommandBase: Restore ArgumentFlags enum value bool logic
The values of the cmTargetPropCommandBase::ArgumentFlags enum
are combined in boolean OR and AND operations in various places.
That used to be valid, but some values were added over time which did
not preserve support for such boolean logic. Update the enum values
such that they are increasing powers of 2 to restore that capability.

Fixes: #24199
2022-11-27 20:17:32 +11:00
Robert Maynard 54d8044084 Tests: Don't presume that Linux CUDA Toolkits provide static libs 2022-11-23 09:27:42 -05:00
Brad King 9474d02386 Tests: Clarify CudaOnly.SeparateCompilationPTX output 2022-11-23 07:52:19 -05:00
Brad King c924d33bec Merge topic 'cxxmodule-module-support-tweaks'
c53748cc09 Tests/RunCMake/CXXModules: mark IMPORTED targets as INTERFACE
a971fcfde7 cmNinjaNormalTargetGenerator: use `cmStrCat`
b7509d6bf8 cmNinjaNormalTargetGenerator: fix grammar in verbose comment
0015cb95de cmGlobalNinjaGenerator: fix comment typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7943
2022-11-23 07:10:52 -05:00
Brad King af937d2933 Merge topic 'try_compile-copy-config'
80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !7948
2022-11-23 07:09:10 -05:00
Brad King 90907c8ff9 Merge topic 'try_compile-copy-config' into release-3.25
80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !7948
2022-11-23 07:09:09 -05:00
Brad King 7c462e36c9 Merge topic 'XCode-XCODE_LINK_BUILD_PHASE_MODE-and-LINK_LIBRARY-genex'
61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7947
2022-11-23 07:08:01 -05:00
Brad King 80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION
Since commit 0c141b0393 (try_compile: Record output location instead of
reverse computing it, 2022-08-31, v3.25.0-rc1~154^2) we always look for
the "Debug" configuration's output binary from the test project.
Restore looking for the `CMAKE_TRY_COMPILE_CONFIGURATION`.

Fixes: #24180
2022-11-22 11:26:28 -05:00
Marc Chevrier 61075d2d7b XCode: ensure LINK_LIBRARY genex is usable with XCODE_LINK_BUILD_PHASE_MODE
Fixes: #24176
2022-11-22 16:44:45 +01:00
Brad King e1b757602c Merge topic 'find_dependency-dedup'
fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
5fbda0f572 find_dependency: Unset temporary variables before returning
591b75ee17 Tests: Add case covering transitive find_dependency calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7936
2022-11-22 09:50:12 -05:00
Brad King 62172b4ab7 Merge topic 'custom-command-comment-genex'
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
2022-11-22 09:47:59 -05:00
Ben Boeckel c53748cc09 Tests/RunCMake/CXXModules: mark IMPORTED targets as INTERFACE
Now that `Ninja` generators will know to generate rules for `IMPORTED`
targets, mark these as `INTERFACE` to avoid requirements of actual
artifacts.
2022-11-21 18:22:00 -05:00
Brad King e69251c828 Merge topic 'xcode-ios-extensionkit'
b99c386122 Xcode: Allow bundling extensionkit extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7900
2022-11-21 10:06:20 -05:00
Brad King 55e3168dc4 Merge topic 'lang-std-flag-order'
a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site
914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7931
2022-11-21 10:03:35 -05:00
Brad King fa7afe5eb3 Merge topic 'cxx-scanning-properties'
a02d792c6e cxxmodules: add properties to control scanning
008c09d6db cmNinjaTargetGenerator: factor out determining the fileset of a source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7935
2022-11-21 10:00:12 -05:00
Brad King 38660bfc20 Merge topic 'test-file-download'
28513a5fba Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOAD
52b9c7b958 Tests: Move CMake.FileDownload cases into RunCMake.file-DOWNLOAD
9dda7c276c Tests: Factor out common helper in RunCMake.file-DOWNLOAD cases
d6af54c473 Tests: Factor out a RunCMake.file-DOWNLOAD test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7937
2022-11-21 09:52:29 -05:00
Peter Würth 26d813092b add_custom_{command,target}: add genex support for COMMENT
Evaluate and expand generator expressions in the `COMMENT` argument of
the `add_custom_command()` and `add_custom_target()` commands.
This allows to include generator expressions, e.g. a targets location
$<TARGET_...> or the current configuration $<CONFIG>, in the build-time
messages.

Fixes #22507
2022-11-19 13:32:56 +01:00
Russell Greene b99c386122 Xcode: Allow bundling extensionkit extensions
Fixes: #24150
2022-11-18 13:58:03 -06:00
Brad King 914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS
Previously we added the language standard flag near the end of all
options, even after those added by `add_compile_options` and friends.
However, on some compilers such as MSVC, the `-std` flag may reset
defaults for flags that precede it on the command line.  Move the
language standard flag to before all other flags that CMake adds for
other abstractions, and before those added by `add_compile_options`.

`CMAKE_<LANG>_FLAGS` should still precede the language flags though,
because they are meant to be treated as language-wide modifications to
the compiler defaults, similar to `$CC $CFLAGS`.

Fixes: #23860
Fixes: #24170
2022-11-18 11:44:52 -05:00
Brad King fb9a3d0c7d find_dependency: Avoid repeating identical dependency searches
Since commit 37da6af17d (find_dependency: Always search dependencies,
2019-03-29, v3.15.0-rc1~301^2) we search for a package every time it is
encountered in the transitive dependency graph traversal, even if it has
been found before.  This was done in case a new visit to a given package
requests different components than a previous visit.  However, it also
causes a lot of repeat processing that is unnecessary in the common case
that all calls share the same set of components (often none).

Restore the logic to avoid repeating the search for an already-found
package.  Handle differences in components by de-duplicating based on
the complete `find_package` call arguments.

Fixes: #23685
2022-11-18 10:31:19 -05:00
Brad King 591b75ee17 Tests: Add case covering transitive find_dependency calls
Issue: #23685
2022-11-18 10:31:19 -05:00