summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Encode newlines in XML attributesLuca Cappa2019-03-061-0/+1
| | | | | | | | Encode `\n` as `
` to avoid generating a literal newline inside an XML attribute. This is more readable and also fixes custom commands in `.csproj` files with VS 2019 RC. Fixes: #19001
* CUDA: Honor CUDA_RESOLVE_DEVICE_SYMBOLS for more target typesRobert Maynard2019-02-051-12/+13
| | | | | | | `CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and executable target types. This relaxation is to allow for better interoperability with linkers that automatically do CUDA device symbol resolution and have no way to disable it.
* Merge topic 'vs-wince-deployment'Brad King2019-02-041-1/+7
|\ | | | | | | | | | | | | f5d72be57a VS: Fix deployment for WinCE projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2907
| * VS: Fix deployment for WinCE projectsWil Stark2019-02-011-1/+7
| | | | | | | | Fixes: #18868
* | VS: Fix WinRT component referencesGilles Khouzam2019-02-011-2/+8
|/ | | | | | | | | | | WinRT components need to be referenced in a similar way that managed code libraries are referenced. Validate that the library reference is a WinRT component and reference it through the project. Add test coverage for `VS_WINRT_COMPONENT`. While at it, fix the IOT reference failing on Win10 SDK 17763 which doesn't include it anymore. Fixes: #18846
* cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-4/+4
|
* Merge topic 'vs-debug-utility-targets'Brad King2019-01-171-49/+52
|\ | | | | | | | | | | | | 22b43b0009 VS: Add support for VS_DEBUGGER_* properties on custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2794
| * VS: Add support for VS_DEBUGGER_* properties on custom targetsNils Gladitz2019-01-161-49/+52
| | | | | | | | | | | | Visual studio itself supports the corresponding `LocalDebugger*` properties on utility targets; support generating them from CMake as well.
* | Merge topic 'fix_csharp_defines'Brad King2019-01-171-0/+4
|\ \ | |/ |/| | | | | | | | | a541d113e6 VS: Honor target_compile_definitions for C# projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2809
| * VS: Honor target_compile_definitions for C# projectsWil Stark2019-01-161-0/+4
| | | | | | | | Fixes: #18698
* | Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-3/+3
|/ | | | Reduce the number of files relying on `cmake.h`.
* Merge topic 'fix-source-group-CMakeLists.txt'Brad King2019-01-151-0/+8
|\ | | | | | | | | | | | | 77303314dc Restore support for a custom source group for CMakeLists.txt Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2803
| * Restore support for a custom source group for CMakeLists.txtBrad King2019-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to target sources but instead generate references to them directly. This accidentally dropped generation of the `.vcxproj.filters` entry for a source group in which `CMakeLists.txt` is the only member. Fixes: #18795
* | cmVisualStudio10TargetGenerator: Fix .NET Compact Framework projects.Wil Stark2019-01-111-1/+32
|/ | | | Fixes: #18672
* VS: Honor WinCE deployment properties in VS 2010+Wil Stark2019-01-101-0/+27
| | | | Previously only VS 2008 was supported.
* Merge topic 'vs_deploy_content_fix'Brad King2018-12-131-0/+1
|\ | | | | | | | | | | | | b5b63da088 VS: Fix Deploy content in .csproj files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2713
| * VS: Fix Deploy content in .csproj filesWil Stark2018-12-071-0/+1
| |
* | VisualStudio10TargetGenerator: support C# refs with '.' in file name.Wil Stark2018-12-111-1/+2
|/ | | | Fixes: #18696
* Merge topic 'cuda-external'Brad King2018-12-061-1/+2
|\ | | | | | | | | | | | | 7b74213461 CUDA: Fix crash on linking to a CUDA target without CUDA enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2704
| * CUDA: Fix crash on linking to a CUDA target without CUDA enabledBrad King2018-12-051-1/+2
| | | | | | | | | | | | | | | | Do not try to device link or add CUDA runtime libraries if the language is not enabled. Fixes: #18673 Issue: #18614
* | Merge topic 'fix-custom-target-with-csharp'Brad King2018-11-011-9/+7
|\ \ | |/ | | | | | | | | | | | | | | 9040df31e2 Merge branch 'backport-fix-custom-target-with-csharp' 1acd1c2b50 CSharp: Fix regression in VS project type selection for custom target a56edad6d6 CSharp: Fix regression in VS project type selection for custom target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2549
| * CSharp: Fix regression in VS project type selection for custom targetBrad King2018-10-311-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A target created by `add_custom_target` should always be a `.vcxproj` file even if it has `.cs` sources involved in custom commands and such. The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7 (remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget, 2018-03-19). The reason is that the `HasLanguage` method added by commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as wrapper for GetLanguages(), 2018-03-19) does not check the target type and so is not a suitable check for deciding the project file extension. The `HasLanguage` method was an attempt at an abstraction that turns out not to work very well. Replace it with a dedicated `IsCSharpOnly` method that considers the target type, sources, and non-transitive `LINKER_LANGUAGE`. Fixes: #18515
| * Merge branch 'vs-csharp-in-custom-target' into release-3.13Brad King2018-10-231-0/+4
| |\ | | | | | | | | | Merge-request: !2515
| * \ Merge branch 'vs-cuda-pdb' into release-3.13Brad King2018-10-101-7/+18
| |\ \ | | | | | | | | | | | | Merge-request: !2473
* | \ \ Merge topic 'vs-csharp-in-custom-target'Brad King2018-10-241-0/+4
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | d004d8c59a VS: Fix crash on CSharp sources in a custom target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2515
| * | | VS: Fix crash on CSharp sources in a custom targetBrad King2018-10-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The target generator does not compute ClOptions for custom targets, so we should not use them either. Fixes: #18377, #18485
* | | | Merge topic 'gem-string'Brad King2018-10-171-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b8bb6ba653 cmGeneratorTarget::GetExportMacro: return const std::string* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2485
| * | | | cmGeneratorTarget::GetExportMacro: return const std::string*Vitaly Stakhovsky2018-10-161-4/+6
| | | | |
* | | | | cmVisualStudio10TargetGenerator: Code improvementVitaly Stakhovsky2018-10-141-45/+30
|/ / / / | | | | | | | | | | | | Disallow incompletely initialized Elem objects
* | | | Merge topic 'vs-cuda-pdb'Brad King2018-10-111-7/+18
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | | | | | | | faf3d7d224 VS: Add workaround for CUDA compiler PDB location with space 592064e026 VS: Drop workaround for CUDA compiler PDB location on CUDA 9.2+ fb378fc4d7 Tests: Fix Cuda test project names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2473
| * | VS: Add workaround for CUDA compiler PDB location with spaceBrad King2018-10-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CUDA Toolkit Visual Studio Integration for version 9.2 and above does honor the `ClCompile.ProgramDataBaseFileName` field when telling `nvcc` how to invoke `cl`. Unfortunately it does not quote paths with spaces correctly: -Xcompiler "... /Fd"C:\path\with space\foo.pdb" ..." Work around this by converting the PDB location to a relative path. Likely we could always do this, but for now make a minimal change just for CUDA support. Fixes: #18440
| * | VS: Drop workaround for CUDA compiler PDB location on CUDA 9.2+Brad King2018-10-101-7/+11
| |/ | | | | | | | | | | | | | | | | | | The workaround added by commit v3.12.0-rc1~227^2 (VS: Add workaround for CUDA compiler PDB location, 2018-04-13) is not necessary on CUDA 9.2+ because the CUDA Toolkit Visual Studio Integration has fixed the original bug and forwards the `ProgramDataBaseFileName` to the host compiler itself. Make the workaround conditional on the CUDA version. Issue: #18440
* | VS: Add flag table entry for -QspectreBrad King2018-10-081-0/+8
|/ | | | | | | Add special logic to map this flag to a top-level build setting instead of being in ClCompile. Fixes: #18426
* Merge topic 'fix-csharp-target-type'Brad King2018-10-031-3/+5
|\ | | | | | | | | | | | | | | 375b420fdf CSharp: Fix regression in VS project type selection 8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2427
| * VS: Fix CSharp flag selection when linking to a static C++ libraryBrad King2018-10-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a CSharp target links to a static C++ library, CMake will compute the link language as C++ instead of CSharp. That may be incorrect and needs further investigation, but it does not affect how VS drives C# linking. However, it does break our flag language selection logic and causes C++ flags to be used for CSharp. In particular, this drops the `-platform:x86` flag on 32-bit builds. Fix this by always selecting the CSharp flags when generating a `.csproj` project type. Issue: #18239
* | Merge topic 'vs-ipo'Brad King2018-09-181-5/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | bef80e6623 VS: Do not specify incremental linking if LTCG is enabled 567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2363
| * | VS: Do not specify incremental linking if LTCG is enabledBrad King2018-09-171-3/+5
| | | | | | | | | | | | | | | | | | Otherwise the linker may warn: LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
| * | IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual StudioNiels Dekker2018-09-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add IPO support for Visual Studio (which is referred to by VS as "Link Time Code Generation" and "Whole Program Optimization"), for VS version >= 10. This allows CMake/VS users to enable IPO by setting property `INTERPROCEDURAL_OPTIMIZATION`. Fixes: #16748
* | | cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-19/+11
| | |
* | | genex: Simplify cmGeneratorExpressionInterpreterBrad King2018-09-071-2/+1
|/ / | | | | | | | | | | | | | | | | All callers were constructing with a non-empty target name using the target whose pointer was passed anyway. Drop this argument. Simplify logic accordingly. Re-order constructor arguments to match the cmCompiledGeneratorExpression::Evaluate arguments. Also remove unnecessary getters.
* | Merge topic 'grd-stdstring'Brad King2018-09-061-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 4d89830d71 cmMakefile: Make GetRequiredDefinition return std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2347
| * | cmMakefile: Make GetRequiredDefinition return std::stringVitaly Stakhovsky2018-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
* | | Merge topic 'isonoff-cstr'Brad King2018-09-061-3/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6f16be6a62 Remove unnecessary c_str() calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2346
| * | | Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-3/+2
| |/ / | | | | | | | | | Use the new IsOn(),IsOff() overloads.
* | | Merge topic 'vs-CMakeLists.txt'Brad King2018-09-051-1/+5
|\ \ \ | |/ / |/| / | |/ | | | | | | 0b82e68f2f VS: Restore CMakeLists.txt references in each target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2349
| * VS: Restore CMakeLists.txt references in each targetBrad King2018-09-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The custom command de-duplication added by commit v3.12.0-rc1~171^2 (VS: Generate a custom command only in the least dependent target, 2018-03-23) accidentally also applied to the `CMakeLists.txt` file reference we put in each target. This file reference comes with a custom command that has no dependencies and that is safe to run repeatedly across multiple targets (via internal stamp checking). Therefore it should be excluded from the de-duplication so that `CMakeLists.txt` references appear in all targets for human reference. Fixes: #18310
* | Merge topic 'vs-winrt-default'Brad King2018-08-311-2/+4
|\ \ | | | | | | | | | | | | | | | | | | e78a0c8e8a VS: Add option to tell generator that platfrom is WinRT by default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2315
| * | VS: Add option to tell generator that platfrom is WinRT by defaultMikhail Korolev2018-08-301-2/+4
| | | | | | | | | | | | | | | | | | Create a ``CMAKE_VS_WINRT_BY_DEFAULT`` variable to indicate this. Fixes: #18286
* | | cmVisualStudio10TargetGenerator: clean up c_str()sVitaly Stakhovsky2018-08-281-8/+8
| | |
* | | Merge topic 'lg-directory'Brad King2018-08-281-4/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 50fbfee3a0 cmLocalGenerator: return directories as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2309