1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-21 20:11:22 +08:00

920 Commits

Author SHA1 Message Date
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
4a960f7186 clang-tidy: fix performance-for-range-copy lints 2022-11-29 12:39:46 -05:00
Ben Boeckel
fc9b5193e4 clang-tidy: fix readability-redundant-string-init lints 2022-11-29 12:39:46 -05:00
Ben Boeckel
707172c66e clang-tidy: fix readability-use-anyofallof lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
1f893e5873 clang-tidy: fix modernize-loop-convert lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
362d6cd234 clang-tidy: fix modernize-raw-string-literal lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
f76ebc3c05 clang-tidy: fix performance-faster-string-find lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
27f5ce07cc clang-tidy: fix performance-unnecessary-value-param lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
4deab0a75c clang-tidy: fix readability-braces-around-statements lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
714a466eeb clang-tidy: fix readability-container-size-empty lints 2022-11-29 12:39:45 -05:00
Ben Boeckel
6d2aa54d62 clang-tidy: fix performance-unnecessary-copy-initialization lints 2022-11-29 12:39:44 -05:00
Ben Boeckel
1b929ba8e4 clang-tidy: fix modernize-use-nullptr lints 2022-11-29 12:39:29 -05:00
Ben Boeckel
860adec528 clang-tidy: fix modernize-pass-by-value lints 2022-11-29 12:39:29 -05:00
Ben Boeckel
83d685ee1b clang-tidy: fix modernize-use-equals-default lints 2022-11-29 12:39:29 -05:00
Ben Boeckel
1ed9974ce5 cmVisualStudio10TargetGenerator: remove unused variable 2022-11-29 12:39:28 -05:00
Brad King
ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources
Extend commit b325484928 (VS: Fix C language standard in target with C++
sources, 2020-09-28, v3.19.0-rc1~74^2) to account for users placing a
`-std:` flag in `CMAKE_C_FLAGS`.
2022-11-18 11:16:50 -05:00
Kyle Edwards
09d7f947d6 cmGeneratorExpression: Require cmake instance 2022-11-11 12:29:41 -05:00
Ilia K
3166547cf6 ASM_MARMASM: Add support for Microsoft ARM assembler language
https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference

Fixes: #23999
2022-11-09 10:22:46 -05:00
ζeh Matt
eef13a4b33 VS: Add COMMON_LANGUAGE_RUNTIME support for "netcore"
Generate `CLRSupport` for Visual Studio projects.

Fixes: #22054
2022-10-28 11:55:58 -04:00
Sebastian Maisch
d2d1be0671 VS: Fix paths in multi-target SDK-style projects
Set the `AppendTargetFrameworkToOutputPath` property to `false` only for
single target SDK-style projects.  This prevents outputs from being
overwritten during the build.  This revises commit 7671d71299 (VS: Fix
target output paths in SDK-style projects, 2022-09-23, v3.25.0-rc1~82^2).

Fixes: #24094
Issue: #23989
2022-10-27 09:58:09 -04:00
Brad King
164a156c7c Merge topic 'remove-vs10-generator'
8d6f015d59 Drop Visual Studio 10 2010 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7718
2022-09-27 10:32:11 -04:00
Brad King
8d6f015d59 Drop Visual Studio 10 2010 generator
This generator has been deprecated since CMake 3.22.  Remove it.
2022-09-26 15:43:04 -04:00
elksson
7671d71299 VS: Fix target output paths in SDK-style projects
Set the `AppendTargetFrameworkToOutputPath` property to `false` so that
MSBuild does not append anything extra to our standard target output
paths. This fixes the `INSTALL` target, among other things.

Fixes: #23989
2022-09-23 15:56:02 -05:00
elksson
2d54d6f395 VS: Fix PACKAGE target build with SDK-style projects
Extend the fix from commit a450cc9533 (VS: Set ResolveNugetPackages to
false for ALL_BUILD and ZERO_CHECK, 2021-12-15, v3.23.0-rc1~196^2~1) to
the `PACKAGE` target too.
2022-09-22 10:52:33 -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
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
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
26b724cf2b Merge branch 'backport-3.24-revert-vs-ZERO_CHECK-proj' 2022-07-22 13:40:56 -04:00
Brad King
289932ded0 VS: Revert "Write ZERO_CHECK.proj for VS19 and above"
Revert commit a334f1b906 (VS: Write ZERO_CHECK.proj for VS19 and above,
2021-12-24, v3.24.0-rc1~607^2) and a supporting change from
commit 7219988b00 (VS: Exclude ZERO_CHECK.proj from .sln for
include_external_msproject, 2022-07-15, v3.24.0-rc4~1^2).

The change was made to support `dotnet` tooling in addition to
`msbuild`.  However, not having `ZERO_CHECK` in the `.sln` breaks common
interactive workflows.  Revert the change for now.  Later it can be
re-introduced behind some kind of option that enables `dotnet` support.

Fixes: #23726
Issue: #20227
2022-07-22 12:54:20 -04:00
Robert Maynard
96bc59b1ca CUDA: Add Device LTO support for nvcc
Fixes #22200
2022-07-22 10:34:45 -04:00
Fredrik Claesson
feeb9ae4ba VS: Add support for (lib)fuzzer /fsanitize=fuzzer flag 2022-07-13 16:12:15 +02:00
Jonas Fierlings
d99d33d749
VS: Generate IntDir property for INTERFACE libraries
This prevents MSBuild from complaining with warning MSB8028.

Fixes #23043
2022-07-08 16:47:01 +02:00
Brad King
d94e09ec88 Merge topic 'cpp-named-module-file-sets'
07bc3b07ec gitlab-ci: test C++ modules using GCC
1b2270aa4e ci: add a Docker image to test out C++ modules with GCC
8c5a53096a Tests/RunCMake/CXXModules: add module-using examples
4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation
b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format
02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents
a046a45aad cmGlobalNinjaGenerator: add a TODO for header units
386465bf83 cmTarget: add support for C++ module fileset types
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7369
2022-06-17 11:35:12 -04:00
Brad King
4f7291928b Merge topic 'msvc_cuda_pass_arch_flags_in_additional_options'
e3983168da CUDA: MSVC pass all cuda gencode flags via AdditionalOptions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7359
2022-06-17 11:29:54 -04:00
Ben Boeckel
386465bf83 cmTarget: add support for C++ module fileset types
C++ modules have two variants which are of importance to CMake:

  - `CXX_MODULES`: interface modules (those using `export module M;`,
    `export module M:part;`, or `module M:internal_part;`)
  - `CXX_MODULE_HEADER_UNITS`: importable header units

Creating C++ modules or partitions are *not* supported in any other
source listing. This is because the source files must be installed (so
their scope matters), but not part of usage requirements (what it means
for a module source to be injected into a consumer is not clear at this
moment). Due to the way `FILE_SET` works with scopes, they are a perfect
fit as long as `INTERFACE` is not allowed (which it is not).
2022-06-16 10:28:34 -04:00
Robert Maynard
e3983168da CUDA: MSVC pass all cuda gencode flags via AdditionalOptions
Fixes #23491
2022-06-16 08:13:57 -04:00
Maxime Raynaud
ba6cecea8e VS: Add compile properties to .NET Sdk projects 2022-06-15 10:59:16 -04:00
Benjamín de la Fuente Ranea
9d6a080421 VS: Add AndroidAPILevel element to generated project files
Map `CMAKE_SYSTEM_VERSION` to the Android Target API Level for Visual
Studio projects.

Fixes: #22886
2022-06-08 09:17:20 -04:00
Brad King
918e98e131 Merge topic 'vs-system-include'
7a2496daad VS: Add support for SYSTEM include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7238
2022-05-20 09:12:57 -04:00
Josiah Bills
7a2496daad VS: Add support for SYSTEM include directories
Fixes: #17904
2022-05-18 18:52:00 -04:00
Robert Maynard
149c952007 CUDA: Use cmLinkLineDeviceComputer in VS generator
Resolve a fixme comment in `ComputeCudaLinkOptions`.
2022-05-03 12:37:59 -04:00
Florian Schweiger
d89af11f89 VS: Add StartupObject property for managed .NET projects 2022-04-12 15:35:17 +02:00
Sumit Bhardwaj
a334f1b906 VS: Write ZERO_CHECK.proj for VS19 and above
For VS 19 and above, switch the format of project file to
`VsProjectType::proj` for ZERO_CHECK target. The `ZERO_CHECK.proj`
consists of primitive MSBuild commands only and has no dependency on any
other targets or props files. This proj file is written as a
`ProjectReference` for other targets, but is not written to the sln
file.
2022-02-20 16:47:36 -08:00
Brad King
4313c5acbc VS: Revert "Write ZERO_CHECK.proj for VS19 and above"
Revert commit 925da7d428 (VS: Write ZERO_CHECK.proj for VS19 and above,
2021-12-24).  Although its commit message was mistakenly not updated, it
implemented the change for VS 2017 and below too.  Since it was merged,
I've discovered several subtle failures in nightly testing with VS 2017.
Revert the change pending further investigation.
2022-02-17 11:23:02 -05:00
Sumit Bhardwaj
925da7d428 VS: Write ZERO_CHECK.proj for VS19 and above
Use VsProjectType::proj as the file format for ZERO_CHECK and write
ZERO_CHECK.proj as a msbuild dependency for other projects.
2022-02-12 12:09:09 -05:00
Sumit Bhardwaj
0682cd3657 VS: Add proj as a project type to VsProjectType
Add `proj` as a project type to VsProjectType so that it can be consumed
by `ZERO_CHECK` target. This commit adds the type and cleans up the code
that needs to treat `proj` and `csproj` in the same fashion. Next commit
will make changes to add `ZERO_CHECK.proj`.
2022-02-12 12:09:00 -05:00
Brad King
e40cea3fe9 Merge topic 'genex-LINK_LIBRARY-to-decorate-library'
2a6b0415d7 $<LINK_LIBRARY>: Add LINK_LIBRARY_OVERRIDE target property
42965799b4 Genex: Add $<LINK_LIBRARY:...>
78dd7d5292 cmRulePlaceholderExpander: add base class for placeholder expansion reuse
4b55828a9f cmExpandListWithBacktrace: add handling of empty elements.
28d7432468 cmComputeLinkInformation: use cmComputeLinkDepends::LinkEntry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6769
2022-02-09 09:28:20 -05:00
Brad King
25003baf50 Merge topic 'vs_buildcache_support'
b764c7c273 VS: Add property to turn off Visual Studio compile batching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6957
2022-02-09 08:59:45 -05:00
Brad King
4bd8a35b55 Merge topic 'dotnet_sdk'
5cdd774d51 VS: Handle build target correct for .NET SDK style projects with Any CPU
309191052c VS: Set Visual Studio versions read out from solution file
f7791698cb VS: Allow setting output directory in .NET SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6944
2022-02-08 08:39:34 -05:00