summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* VS: Add support for add_custom_command DEPFILEBrad King2021-06-091-5/+27
| | | | | | | | Transform the depfile into MSBuild `AdditionalInputs` content. Add MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for future builds without actually modifying the `.vcxproj` file. Fixes: #20286
* cmComputeLinkInformation: Improve type safety of item IsPath memberBrad King2021-05-291-3/+4
| | | | Use an enum to avoid implicit conversions to bool.
* Merge topic 'relative-paths'Brad King2021-05-141-12/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | f6d4fa63f8 cmStateDirectory: Comment relative path top directory selection approach f0ffb1e2d4 cmGlobalGenerator: Simplify relative path conversion in AddRuleHash d346805e41 cmLocalCommonGenerator: Select work directory semantically 15fa320071 cmLocalGenerator: Factor out relative path conversion helpers 1879f1bcbc cmLocalCommonGenerator: Factor out relative path conversion helper 1d1d88d3c8 cmMakefileTargetGenerator: Clarify name of relative path conversion helper ec1ea13066 cmDependsFortran: Simplify relative path conversion helper ba7b939831 cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6122
| * cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-12/+6
| | | | | | | | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* | VS Generator: Properly reference included external C# projectsDario Passet2021-05-131-4/+3
|/
* Source: Minor code improvementsVitaly Stakhovsky2021-05-111-1/+1
|
* Merge topic 'vs-config-specific-csproj'Brad King2021-05-041-1/+15
|\ | | | | | | | | | | | | d8786bfa16 VS: Add support for per-config C# sources Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6055
| * VS: Add support for per-config C# sourcesThomas Vaughan2021-05-031-1/+15
| | | | | | | | Fixes: #22108
* | VS: Fix CSharp sources inside build directoryKinan Mahdi2021-05-031-2/+5
|/ | | | Fixes: #22104
* VS: switch to new folder structure while keeping the old one workingMarcel Ritzschke2021-03-181-5/+7
| | | | Fixes: #21170
* Merge topic 'vs-toolset-version'Brad King2021-03-151-6/+6
|\ | | | | | | | | | | | | | | | | 30c835428f VS: Accept and translate '-T version=' values with three components 58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9 09f59da7f0 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5903
| * VS: Fix '-T version=14.28' under VS 16.9Brad King2021-03-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake accepts the toolset version that is default in the current VS version by matching the name later VS versions will use for the SxS props files. It predicts the future name based on the first two components of the current VS version's default toolset. However, this heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9 because the latter's default toolset version is 14.28.29910, which did not increment the second version component (unprecedented in VS). Fix this by always using the requested version's SxS props file when it exists, even if it matches the first two components of the current VS version's default toolset. Also add a special case for the name VS 16.10 will use for VS 16.9's default toolset, so that it can be used with VS 16.9 too. Fixes: #21922
* | VS: Restore support for PCH in CXX but not C within once targetBrad King2021-02-191-1/+5
| | | | | | | | | | | | | | | | Fix logic from commit 9df1f33c9a (VisualStudio: move PCH rules to projects when possible., 2020-10-15, v3.20.0-rc1~638^2) to explicitly disable PCH on sources that should not use the target-wide PCH rules. Fixes: #21827
* | cmVisualStudio10TargetGenerator: Refactor per-source PCH logicBrad King2021-02-191-6/+6
| | | | | | | | De-duplicate the link language lookup.
* | VS: Add genex support to VS_SHADER_FLAGSJeremiah van Oosten2021-01-051-1/+8
| |
* | Merge topic 'policy-cmp0111-iface'Brad King2020-11-241-1/+2
|\ \ | |/ | | | | | | | | | | | | | | 54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries 43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5530
| * cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE libraryBrad King2020-11-231-1/+2
| | | | | | | | Issue: #21470
| * Merge topic 'cuda_vs_skip_computation' into release-3.19Brad King2020-10-271-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | dd77dec18d VS: Don't compute CUDA options unless necessary e9109dec36 Merge branch 'ninja-multi-per-config-sources' into release-3.18 7c0de4175b Merge branch 'cmake-E-cat-binary' into release-3.18 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
* | | Reduce the scope of temporary cmProp variables and other improvementsVitaly Stakhovsky2020-11-051-8/+7
| | |
* | | Merge topic 'cuda_vs_skip_computation'Brad King2020-10-271-2/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | dd77dec18d VS: Don't compute CUDA options unless necessary Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
| * | VS: Don't compute CUDA options unless necessaryRaul Tambre2020-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following scenario (with 3.18 policies): 1. A CXX target is created. 2. CUDA language is enabled. CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be set. Because the CXX target was created before CUDA was enabled it wouldn't have it set. The Visual Studio generator would however end up computing CUDA compile options for the CXX target, which would result in a fatal error due to the policy violation. There doesn't seem to be a reason to do this for targets that don't actually use the CUDA language, so we can skip and generate the CXX target just fine. Fixes: #21341
* | | configure_file: Add option for user defined permissionsAsit Dhal2020-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | User defined permissions and options to copy permissions are implemented. Fixes: #20866
* | | VisualStudio: move PCH rules to projects when possible.Robert Maynard2020-10-201-19/+47
| |/ |/| | | | | | | | | | | | | | | | | This dramatically helps reduce the size of the solution files when PCH is enabled, since 2 entries per source file are removed. This also corrects a subtle issue where when UNITY + PCH was enabled, the PCH would not be used if a user explicitly tried to compile a source file from outside the unity group. This is possible via the compile source option in the Visual Studio GUI.
* | Merge topic 'csharp-source_group-bugfix'Brad King2020-10-061-1/+8
|\ \ | |/ | | | | | | | | | | 8d87cfdbf3 VS: Fix regression in C# source links Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5314
| * VS: Fix regression in C# source linksKinan Mahdi2020-10-051-1/+8
| | | | | | | | | | | | Fix logic used since commit ac6b18cd90 (CSharp: Add support for source groups with out-of-source builds, 2020-02-18, v3.18.0-rc1~645^2). Add a check of the physical file location for C# source groups.