summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Allow specifying VCTools version with the ClangCL toolsetRichard Dzenis2023-08-161-25/+31
| | | | | | | | | Visual Studio supports specifying both: <PlatformToolset>ClangCL</PlatformToolset> <VCToolsVersion>14.32.31326</VCToolsVersion> Fixes: #25189
* Merge topic 'vs-sdk-selection'Brad King2023-08-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | d5118ed2e5 Merge branch 'backport-vs-sdk-selection' into vs-sdk-selection 89b611ab32 VS: Select latest Windows SDK even when targeting Windows 8.1 and below ae97d82e83 VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selection 15ff89654b VS: Teach CMAKE_GENERATOR_PLATFORM to use Windows 10 SDKs for older versions bba1a23da9 VS: Consolidate Windows SDK major version selection dispatch 209973e510 VS: Do not print empty Windows SDK version when none is selected ec6dd77053 Tests: Remove redundant condition in RunCMake.GeneratorPlatform test 4776a584ad Help: Add 3.27 release note on VS default SDK selection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8697
| * Merge branch 'backport-vs-sdk-selection' into vs-sdk-selectionBrad King2023-08-101-1/+1
| |\
| | * VS: Teach CMAKE_GENERATOR_PLATFORM to use Windows 10 SDKs for older versionsBrad King2023-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Honor an explicit `version=` field selecting a Windows 10 SDK regardless of the Windows target version. Issue: #25170
* | | cmCryptoHash: prefer to cmSystemTools::ComputeStringMD5Ben Boeckel2023-08-081-1/+3
|/ / | | | | | | | | | | | | The latter call is no longer post-bootstrap only since 596439b1bb (cmCustomCommandGenerator: Add option to transform depfile, 2020-10-05) via !5325. Convert callers to just use `cmCryptoHash` directly and remove the bootstrap guard.
* | strings: use `emplace_back` with `cmStrCat` argumentsBen Boeckel2023-07-281-3/+3
| |
* | strings: use character literals where possibleBen Boeckel2023-07-281-5/+5
| |
* | cmStrCat: use in Windows-specific sourcesBen Boeckel2023-07-281-155/+155
| |
* | strings: combine string literals where possibleBen Boeckel2023-07-271-2/+4
| |
* | strings: compare to static `string_view` instances in Windows-only codeBen Boeckel2023-07-271-73/+75
| |
* | Drop Visual Studio 11 2012 generatorBrad King2023-06-131-1/+0
|/ | | | This generator has been deprecated since CMake 3.25. Remove it.
* VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selectionBrad King2023-04-051-0/+9
| | | | | | | Add a `version=` field to explicitly control the SDK version selection without relying on `CMAKE_SYSTEM_VERSION`. Fixes: #16713
* VS: Defer Windows SDK selection until CMAKE_GENERATOR_PLATFORM is knownBrad King2023-04-051-0/+15
| | | | Prepare to teach `CMAKE_GENERATOR_PLATFORM` to affect SDK selection.
* VS: Build custom commands concurrently when possibleIvan Zinkevich2023-01-231-0/+11
| | | | | | Enable the `BuildInParallel` setting in VS project files when supported. Fixes: #18405
* Revise C++ coding style using clang-format-15Kitware Robot2023-01-181-3/+3
| | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 15. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Fixes: #24315
* clang-tidy: fix `modernize-raw-string-literal` lintsBen Boeckel2022-11-291-1/+1
|
* clang-tidy: fix `readability-string-compare` lintsBen Boeckel2022-11-291-1/+1
|
* clang-tidy: fix `bugprone-parent-virtual-call` lintsBen Boeckel2022-11-291-0/+1
|
* clang-tidy: fix `readability-braces-around-statements` lintsBen Boeckel2022-11-291-1/+2
|
* clang-tidy: fix `readability-else-after-return` lintsBen Boeckel2022-11-291-36/+54
|
* clang-tidy: fix `readability-redundant-string-cstr` lintsBen Boeckel2022-11-291-1/+1
|
* clang-tidy: fix `modernize-use-auto` lintsBen Boeckel2022-11-291-1/+1
|
* clang-tidy: fix `readability-static-accessed-through-instance` lintsBen Boeckel2022-11-291-1/+2
|
* cmake --build: Use both inter- and intra-project parallelism with msbuildBrad King2022-11-161-2/+0
| | | | | | | | | | | | | | | | | | Since commit 1ab3881ec9 (cmake: Add options for parallel builds to --build mode, 2018-04-14, v3.12.0-rc1~42^2), `cmake --build --parallel` has added two options to the msbuild command line: * `/m` enables inter-project parallelism in msbuild. * `/p:CL_MPCount=1` suppresses intra-project parallelism in cl. The latter was used to avoid `O(N^2)` compilation threads on `N` processors. In practice however, projects often have many source files in a few targets, so `--parallel` actually reduces parallelism. Drop the latter option to restore intra-project parallelism. Users can always add `-- /p:CL_MPCount=1` themselves. Fixes: #20564
* ASM_MARMASM: Add support for Microsoft ARM assembler languageIlia K2022-11-091-0/+8
| | | | | | https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference Fixes: #23999
* Drop Visual Studio 10 2010 generatorBrad King2022-09-261-179/+0
| | | | This generator has been deprecated since CMake 3.22. Remove it.
* cmVSGenerator: Add support for two-part toolset versions for Visual StudioNicholas Sinlock2022-09-021-0/+21
| | | | | | | | | Enables the Global Visual Studio Versioned Generator to use two-part toolset versions, if only one toolset has that version number. For example, (14.32 is specified when 14.32.32142 and 14.32.23242 are installed). This change also add a unique return code and message if a two-part version is used when multiple matching versions are present. Fixes: #23933
* VS: Revert "Write ZERO_CHECK.proj for VS19 and above"Brad King2022-07-221-16/+0
| | | | | | | | | | | | | | | 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
* VS: Exclude ZERO_CHECK.proj from .sln for include_external_msprojectSumit Bhardwaj2022-07-201-0/+8
| | | | | | | | | | | | | | | In `cmGlobalVisualStudio7Generator::WriteTargetsToSolution`, we skip writing `ZERO_CHECK.proj` to solution file as the check in `cmGlobalVisualStudioGenerator::IsInSolution` returns `false` for `ZERO_CHECK`. However, we write ZERO_CHECK to ProjectDependencies for external projects as there are no checks in `cmGlobalVisualStudio71Generator::WriteExternalProject`. Similar to `cmGlobalVisualStudioGenerator::IsInSolution`, we introduce `IsDepInSolution(const std::string&)` which excludes `ZERO_CHECK.proj` from being added to sln file for the cases where we have `ZERO_CHECK.proj`. Fixes: #23708
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-4/+4
| | | | | | | | Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
* VS: Write ZERO_CHECK.proj for VS19 and aboveSumit Bhardwaj2022-02-211-0/+8
| | | | | | | | | 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.
* VS: Revert "Write ZERO_CHECK.proj for VS19 and above"Brad King2022-02-171-7/+0
| | | | | | | | 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.
* Merge topic 'vs-package-restore-docs'Brad King2022-02-161-1/+1
|\ | | | | | | | | | | | | | | d92469e572 Help: Clarify how package resolve mode is intended to be used f320a31087 cmake --build: prioritize --resolve-package-references over preset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6984
| * cmake --build: prioritize --resolve-package-references over presetCarsten Rudolph2022-02-151-1/+1
| | | | | | | | Fixes: #23224
* | VS: Write ZERO_CHECK.proj for VS19 and aboveSumit Bhardwaj2022-02-121-0/+7
|/ | | | | Use VsProjectType::proj as the file format for ZERO_CHECK and write ZERO_CHECK.proj as a msbuild dependency for other projects.
* VS: Handle build target correct for .NET SDK style projects with Any CPUFlorian Schweiger2022-02-071-14/+27
| | | | | | * Extend Visual Studio solution parser for reading build target * Map solution build target to project build target (especially for Any CPU) * Use C++ <optional> template instead of pointer return value for cmSlnData::GetProjectByGUID
* Make cmGlobalVisualStudioGenerator::VSVersion enum classSumit Bhardwaj2022-01-251-14/+14
|
* Presets: add resolve packages setting to build presets.Carsten Rudolph2022-01-221-0/+4
|
* cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-221-0/+69
|
* cmBuildOptions: Split build arguments into separate object.Carsten Rudolph2022-01-221-4/+6
|
* Source: Fix possible IWYU warnings in Windows generatorsNAKAMURA Takumi2021-11-191-1/+12
|
* VS: Model a default target frameworkBrad King2021-11-061-0/+7
| | | | | | | | | | Add fields to the VS generator to select a target framework. Migrate the existing default for VS 12 .NET CF for Windows CE. Report the values in `CMAKE_VS_*` variables and use them for the CSharp compiler id project too. Issue: #22849
* cmGlobalVisualStudio10Generator: Add method to find MSBuild earlyBrad King2021-10-201-0/+6
| | | | | Add a way to find MSBuild before the main `FindMakeProgram` code path has executed.
* cmGlobalVisualStudio10Generator: Allow subclasses to reset MSBuild searchBrad King2021-10-201-1/+0
| | | | While at it, convert to inline initialization.
* Deprecate Visual Studio 10 2010 generatorBrad King2021-07-291-1/+1
| | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* VS: Add Visual Studio 17 2022 generatorBrad King2021-06-251-0/+2
| | | | Fixes: #22339
* VS: Do not apply any '/external:*' flag table mapping on VS < 16.10Brad King2021-06-171-8/+10
| | | | | | | | | | | Since commit 887e9df0c7 (VS: Update v142 CL flag table for VS 16.10, 2021-06-04) we map several `/external:*` flags to their corresponding `.vcxproj` elements. These elements were added to `cl.xml` in VS 16.10, so filter them out in older VS versions. Add a field to the json flag table format to specify the minimum version of VS needed for a given mapping. Issue: #22308
* VS: Compare VS instance versions as stringsBrad King2021-06-171-6/+7
| | | | This makes the values more readable.
* VS: Do not apply '/external:W*' flag table mapping on VS < 16.10Brad King2021-06-161-2/+11
| | | | | | | | | | Since commit 9054cd05e6 (VS: Add flag table entries for '/external:W*' flags in VS 16.10, 2021-05-28, v3.20.4~10^2) we map flags to the `ExternalWarningLevel` element. VS 16.9 does not support that element, but its `cl` compiler does support the `/external:W*` flags. Filter out the flag table entry on older VS versions. Fixes: #22308
* cmGlobalVisualStudio10Generator: Move static functions to anonymous namespaceBrad King2021-06-161-2/+4
|