summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Add proj as a project type to VsProjectTypeSumit Bhardwaj2022-02-121-0/+15
| | | | | | | 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`.
* Merge topic 'genex-LINK_LIBRARY-to-decorate-library'Brad King2022-02-091-2/+4
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Genex: Add $<LINK_LIBRARY:...>Marc Chevrier2022-02-071-2/+4
| | | | | | | | | | | | | | | | This generator expression offers the capability, for the link step, to decorate libraries with prefix/suffix flags and/or adding any specific flag for each library. Fixes: #22812, #18751, #20078, #22703
* | Merge topic 'vs_buildcache_support'Brad King2022-02-091-1/+3
|\ \ | | | | | | | | | | | | | | | | | | b764c7c273 VS: Add property to turn off Visual Studio compile batching Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6957
| * | VS: Add property to turn off Visual Studio compile batchingKaloyan Donev2022-02-081-1/+3
| |/ | | | | | | Resolves: #23179
* | Merge topic 'dotnet_sdk'Brad King2022-02-081-0/+11
|\ \ | |/ |/| | | | | | | | | | | | | 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
| * VS: Allow setting output directory in .NET SDK style projectsFlorian Schweiger2022-02-071-0/+11
| |
* | VS: Simplify generation of per-source PCH settingsBrad King2022-02-031-9/+16
| | | | | | | | | | | | | | | | | | | | Avoid looking up the PCH create/use flags just to map them through flag tables back to the `.vcxproj` settings. Instead, simply generate the PCH settings directly for each source file. Since commit 9df1f33c9a (VisualStudio: move PCH rules to projects when possible., 2020-10-15, v3.20.0-rc1~638^2) we already do this for the target-wide PCH settings.
* | VS: .Net SDK Style projects can add Reference to dllsSumit Bhardwaj2022-02-011-0/+1
|/ | | | | | | | When support for `DOTNET_SDK` was added, only a minimal set of options were built in. Based on user feedback, support for reference to dlls (not just projects) is needed. That support is added here. Fixes: #23166
* Make cmGlobalVisualStudioGenerator::VSVersion enum classSumit Bhardwaj2022-01-251-9/+9
|
* Merge topic 'vs-package-restore'Brad King2022-01-241-5/+35
|\ | | | | | | | | | | | | | | | | | | 9aa7831f05 Presets: add resolve packages setting to build presets. b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 193b8fca52 cmBuildOptions: Split build arguments into separate object. 6a10103493 Help: Update preset schema description for version 3 entries. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6761
| * cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-221-5/+35
| |
* | VS: Add support for ASAN -fsanitize=address flagHanaa Elghobashi2022-01-201-0/+9
|/ | | | Fixes: #21081
* Consolidate usage of VsProjectTypeSumit Bhardwaj2021-12-231-31/+33
| | | | | | Move ProjectFileExtension handling logic to use ProjectType and remove extraneous checks in .Net SDK style project generation. This change will make introducing new project types relatively simpler.
* Merge topic 'vs-csharp-dotnet-sdk'Brad King2021-12-221-52/+192
|\ | | | | | | | | | | | | | | | | 0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6634
| * VS: Add DOTNET_SDK property to generate SDK-style C# projectsSumit Bhardwaj2021-12-211-2/+117
| | | | | | | | | | | | | | | | Changes in cmVisualStudio10TargetGenerator::Generate to write .Net SDK-style project for VS generators VS 19 and above. Also adds documentation and tests. Issue: #20227
| * VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECKSumit Bhardwaj2021-12-151-0/+14
| | | | | | | | | | | | | | | | When SDK-style targets in a project are restored, ResolveNugetPackageAssets target is not skipped. However, ALL_BUILD and ZERO_CHECK do not have any nuget packages to resolve and the build fails. This commit sets ResolveNugetPackages to false which skips the target and the build succeeds.
| * cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild projectSumit Bhardwaj2021-12-151-52/+63
| | | | | | | | | | | | | | | | | | In preparation for generating .Net SDK style project, refactor cmVisualStudio10TargetGenerato::Generate to split the functionality to write classic MSBuild project file. This commit only introduces a helper function and moves the functionality there. A later commit will add WriteSdkStyleProjectFile, the call to it, and the rest of the .Net SDK-style changes.
* | VS: Add custom VCEnd labels only in C# projectsSumit Bhardwaj2021-12-161-8/+10
| | | | | | | | | | | | | | | | | | In commit dff98aa9ca (VS: add missing label in C# project-build events, 2021-12-15) the condition for adding our own `VCEnd` label was based on the project being managed or not. Since we support managed C++ projects, switch the condition to be based on whether the project is C#. Issue: #21440
* | Merge topic 'vs-csproj-scripts'Brad King2021-12-161-0/+10
|\ \ | | | | | | | | | | | | | | | | | | dff98aa9ca VS: add missing label in C# project-build events Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6801
| * | VS: add missing label in C# project-build eventsSteven Boswell2021-12-151-0/+10
| |/
* | Merge topic 'msvc_cuda_propagate_defines_to_ptx'Brad King2021-12-161-0/+17
|\ \ | |/ |/| | | | | | | | | 574b492b47 CUDA: Visual Studio Generator propagates definitions for PTX files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6802
| * CUDA: Visual Studio Generator propagates definitions for PTX filesunknown2021-12-141-0/+17
| | | | | | | | | | | | | | | | From CUDA 9.0 to CUDA 11.4 the CUDA Visual Studio integration defines omitted user defines from PTX generation. With CUDA 11.5 this has been resolved, so we backport the fix to allow for consistent behavior when using CMake
* | Merge topic 'msbuild-target-inputs-object-depends'Brad King2021-12-101-0/+16
|\ \ | | | | | | | | | | | | | | | | | | abc6377469 VS: Add OBJECT_DEPENDS as AdditionalDependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6775
| * | VS: Add OBJECT_DEPENDS as AdditionalDependenciesDietmar Scheidl2021-12-091-0/+16
| |/ | | | | | | Fixes: #22733
* | VS: Move LocalDebugger* settings to the end of their PropertyGroupCedric Martineau2021-12-031-34/+34
| | | | | | | | | | | | | | Define the settings after others like `OutDir` so that the latter can be referenced. Fixes: #18094
* | Merge topic 'vs-csproj-scripts'Brad King2021-12-031-8/+2
|\ \ | | | | | | | | | | | | | | | | | | 13a7ae2194 VS: Revert "Add missing label in C# project-build events" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6781
| * | VS: Revert "Add missing label in C# project-build events"Brad King2021-12-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit b284a21fee (VS: Add missing label in C# project-build events, 2021-09-03, v3.22.0-rc1~156^2). The change broke cases using multiple successful custom commands. Revert it pending further investigation into the interaction of the generated script code with `Microsoft.Common.CurrentVersion.targets`, and whether this is needed for all managed projects or just C# projects. Also add a test covering the case that was broken. Fixes: #22964 Issue: #21440
* | | cmVisualStudio10TargetGenerator: Change VsProjectType to be enum classSumit Bhardwaj2021-12-011-52/+56
| |/ |/|
* | Source: Fix possible IWYU warnings in Windows generatorsNAKAMURA Takumi2021-11-191-1/+24
| |
* | VS: Fix pre-VS15.8 unity build exclusion of per-config sourcesBrad King2021-11-111-1/+1
| | | | | | | | | | | | | | | | | | In a unity build, the original source files need to be excluded from the build. Prior to VS 15.8, this is done via `ExcludeFromBuild`, which is the same mechanism used to implement per-config sources. Fix a conflict in the implementation of the two features so that unity-batched sources are excluded from all configurations rather than just those in which they would otherwise have been included.
* | Merge topic 'vs-framework-version'Brad King2021-11-081-35/+54
|\ \ | |/ | | | | | | | | | | | | | | | | d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022 f97f8537f3 VS: Model a default target framework e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection 78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6699
| * VS: Model a default target frameworkBrad King2021-11-061-10/+11
| | | | | | | | | | | | | | | | | | | | 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
| * cmVisualStudio10TargetGenerator: Refactor target framework selectionBrad King2021-11-061-35/+53
| | | | | | | | Split the selection from the generation of the resulting element(s).
* | CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATIONRobert Maynard2021-10-201-4/+3
| | | | | | | | | | | | The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION` now aren't mutually exclusive and can now be used together on the same target.
* | VS: Fix compilation of single source with PCH in Unity BuildBrad King2021-10-191-1/+2
|/ | | | | | | | | | | | | Sources that are part of a unity build are normally not compiled individually. However, the VS IDE allows a single source to be compiled. This can also be achieved on the command line: msbuild my.vcxproj ... -t:ClCompile -p:SelectedFiles=<src> where `<src>` is the path in the vcxproj `ClCompile` entry. In a target with precompiled headers, the source needs PCH settings to support individual compilation even if the normal unity build does not.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-91/+91
|
* Merge topic 'vs2022'Brad King2021-09-161-0/+4
|\ | | | | | | | | | | | | | | b6ac10394b VS: Update Visual Studio 17 2022 generator for Preview 4 f200f4d5a7 VS: Fix managed C++ project generation for VS 2022 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6524
| * VS: Fix managed C++ project generation for VS 2022Brad King2021-09-151-0/+4
| | | | | | | | | | | | | | VS 2022 expects managed `.vcxproj` files to have a `ManagedAssembly` element. Fixes: #22583
* | Merge topic 'vs_settings'Brad King2021-09-101-35/+45
|\ \ | | | | | | | | | | | | | | | | | | | | | f21158cdfe VS: Honor VS_SETTINGS source file property on all sources 3bf013632d cmVisualStudio10TargetGenerator: Factor out helper to write VS_SETTINGS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6492
| * | VS: Honor VS_SETTINGS source file property on all sourcesSteven Boswell2021-09-091-3/+6
| | | | | | | | | | | | | | | | | | Extend the feature added by commit 2ce42f281f (VS: Add VS_SETTINGS source file property, 2020-03-18, v3.18.0-rc1~449^2~3) to support all source file types.
| * | cmVisualStudio10TargetGenerator: Factor out helper to write VS_SETTINGSSteven Boswell2021-09-091-32/+39
| | |
* | | VS: Add missing label in C# project-build eventsSteven Boswell2021-09-091-2/+8
|/ / | | | | | | Fixes: #21440
* | Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-3/+3
| |
* | cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-4/+1
| | | | | | | | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* | Merge topic 'vs-iface-include-dirs'Brad King2021-08-021-0/+3
|\ \ | |/ | | | | | | | | | | 53aabe9817 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6411
| * VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE librariesBrad King2021-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | Since commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the VS generator may process INTERFACE libraries. Avoid code paths in the generator that process include directories because they should not be used by INTERFACE libraries since they do not compile anything. Fixes: #22494
* | Merge topic 'msvc-isystem'Brad King2021-06-211-2/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | f29e1874ad Compiler/MSVC: use the `-external:I` flag for system includes 5a5c85dffd Tests/IncludeDirectories: support MSVC in system include tests 399a3204bb Tests/IncludeDirectories: align sibling predicates 20ab49193b Tests/IncludeDirectories: factor out applying flags to targets 809f7b0c3a Tests/IncludeDirectories: fix copy pasta for otherlib b094324948 Tests/IncludeDirectories: Include system headers via angle brackets 8f63f3b04e cmVisualStudio10TargetGenerator: remove unused variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Julien Waechter <greenjava@gmail.com> Acked-by: DE-VS wenglor <devs.wenglor@gmail.com> Merge-request: !4766
| * cmVisualStudio10TargetGenerator: remove unused variableBen Boeckel2021-06-171-2/+0
| |
* | VS: Add support for Utf8Enconding when using VS 16.10+Gustavo Varo2021-06-171-1/+3
|/ | | | | | | On VS 16.10 Preview 2 or above, generate `UseUtf8Encoding` instead of `StdOutEncoding=UTF-8` in `.vcxproj` files. Fixes: #22032