summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cxx11-nullptr'Brad King2017-08-251-1/+1
|\ | | | | | | | | | | | | 5962db43 Use C++11 nullptr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1175
| * Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
| |
* | VS: Fix VS_SDK_REFERENCES when target is not a Windows 10 appRoc Ramon2017-08-231-3/+3
|/ | | | Close the `<ItemGroup>` element whenever it is opened.
* VS: remove unnecessary c_str()Vitaly Stakhovsky2017-08-171-58/+53
|
* VS: print comment in CSharp target only if it is actually setMichael Stürmer2017-07-121-1/+5
|
* Merge topic 'vs-link-debug-flags'Brad King2017-06-291-28/+9
|\ | | | | | | | | | | | | | | | | | | 7ba27e36 VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL ae44496e VS: Fix GenerateDebugInformation values for v140 and v141 toolsets 27bef160 VS: Fix GenerateDebugInformation flag map text for v141 toolsets 17a397c2 VS: Split link flag table between v140 and v141 toolsets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1002
| * VS: Fix GenerateDebugInformation values for v140 and v141 toolsetsBrad King2017-06-281-28/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When VS 2015 was first released, its new v140 toolset came with a `link.xml` file that changed the `GenerateDebugInformation` boolean (`false` and `true`) value from earlier toolsets to an enumeration consisting of the possible values `No`, `Debug`, and `DebugFastLink`. We first adapted to this in commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation, 2016-01-08), but that broke older toolsets that still expected the boolean. Then commit v3.6.0-rc1~295^2~1 (VS: Fix VS 2015 .vcxproj debug setting for older toolsets, 2016-02-24) added a hack to fix up the value based on the toolset in use. Several follow-up commits fixed this for more older toolsets because our flag table was at the time based on the generator in use rather than the toolset in use. Since commit v3.8.0-rc1~396^2 (VS: Choose flag map based on the toolset name, 2016-10-17) we use a flag table based on the toolset, so the fixup hack should not be needed. We had to keep it around only due to our default value for GenerateDebugInformation (`false` or `No`) still being based on the generator instead of the toolset. A VS 2015 update was released that changed the v140 toolset `link.xml` file back to using `false` and `true` for the `GenerateDebugInformation` enumeration variants previously known as `No` and `Debug`. In order to know which pair to use, we need to parse the `link.xml` file for the current toolset. Switch back to using `false` and `true` unconditionally in our `GenerateDebugInformation` flag table entries and default value. With that plus the toolset-based flag table, we now get incorrect values for `GenerateDebugInformation` only when using a v140 toolset from an older VS 2015 installation. Detect this case by parsing `link.xml` and add special logic to convert `false` and `true` to `No` and `Debug` to satisfy the older toolset specification. Inspired-by: Ian Hojnicki <nullref@live.com> Fixes: #17020
| * Merge branch 'vs-cuda-fix-flags' into release-3.9Brad King2017-06-271-3/+3
| |\
| * \ Merge branch 'vs-cuda-fix-flags' into release-3.9Brad King2017-06-211-10/+35
| |\ \
* | \ \ Merge topic 'vs_csharp_custom_command'Brad King2017-06-271-30/+129
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ec409a11 Vs: fix CSharp custom command by introducing inline MSBuild <Targets>s dcdab5cf Vs: factor out computation of <Link> tag for CSharp source files 0a8f469a Vs: refactor WriteCustomRule for preparation of CSharp support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !970
| * | | | Vs: fix CSharp custom command by introducing inline MSBuild <Targets>sMichael Stürmer2017-06-221-6/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom command implementation is based on the Microsoft support article: https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process Fixes: #16960
| * | | | Vs: factor out computation of <Link> tag for CSharp source filesMichael Stürmer2017-06-221-8/+21
| | | | |
| * | | | Vs: refactor WriteCustomRule for preparation of CSharp supportMichael Stürmer2017-06-221-18/+30
| | | | |
* | | | | Merge topic 'vs-cuda-fix-flags'Brad King2017-06-271-3/+3
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | | | | | bbc1f364 VS: Fix support for nvcc flags not in our flag table Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1007
| * | | VS: Fix support for nvcc flags not in our flag tableBrad King2017-06-271-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA -Xcompiler placement bug, 2017-06-21) accidentally appended to the `AdditionalOptions` as if it were a `;`-separated list, but it is actually a command-line string. Append with a space instead. While at it, fix the same problem for the `AdditionalOptions` added to `CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings, 2017-06-09). Fixes: #17008
* | | Vs: disable unnecessary <ItemDefinitionGroups> for CSharp targetsMichael Stürmer2017-06-221-0/+3
| | |
* | | Vs: change comparison to use .ProjectType member always as first comparatorMichael Stürmer2017-06-221-23/+23
| | |
* | | Merge topic 'vs-cuda-fix-flags'Brad King2017-06-221-10/+35
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 3b754215 VS: Improve workaround for CUDA -Xcompiler placement bug f2059585 VS: Fix target_compile_options for CUDA Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !996
| * | VS: Improve workaround for CUDA -Xcompiler placement bugBrad King2017-06-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in proper project file fields, 2017-03-07) we worked around a bug in the CUDA VS integration by dropping `AdditionalCompilerOptions`. However, this silently drops `-Xcompiler=` options given by the user that don't map to one of CudaCompile's dedicated settings. Improve the workaround to instead put the remaining `AdditionalCompilerOptions` into the `AdditionalOptions` field behind `-Xcompiler=` ourselves.
| * | VS: Fix target_compile_options for CUDABrad King2017-06-211-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA. The exclusion added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options to C compiler, 2017-03-07) was correct but we need additional logic to pass the CUDA compile options to the CUDA compiler. Also we should still pass the CXX or C options to MSVC (ClCompile) when those languages are enabled even if the link language is CUDA.
* | | Merge topic 'vs_csharp_link_to_managed_cxx'Brad King2017-06-221-4/+0
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 51865fc6 Vs: allow CSharp targets to be linked to CXX targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !993
| * | Vs: allow CSharp targets to be linked to CXX targetsMichael Stürmer2017-06-211-4/+0
| |/ | | | | | | Fixes: #16755
| * Merge branch 'ipo-per-lang' into release-3.9Brad King2017-06-141-1/+1
| |\
* | | Vs: remove /nowin32manifest from C# flags to enable default VS behaviorMichael Stürmer2017-06-161-0/+6
| | | | | | | | | | | | | | | | | | | | | if /nowin32manifest is specified, it will be preferred over any occurring /win32manifest:<file> parameter Fixes: #16969, #16970
* | | Merge topic 'vs_csharp_prop_for_all_extensions'Brad King2017-06-151-24/+44
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | c90630c5 Vs: add support for VS_CSHARP_* target property for additional file extensions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !961
| * | | Vs: add support for VS_CSHARP_* target property for additional file extensionsMichael Stürmer2017-06-131-24/+44
| | | | | | | | | | | | | | | | Fixes: #16726
* | | | Merge topic 'ipo-per-lang'Brad King2017-06-151-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | ba247cca IPO: Consider support for each language separately Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !964
| * | | IPO: Consider support for each language separatelyBrad King2017-06-141-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* | | Merge topic 'vs-dotnet-custom-reference-tags'Brad King2017-06-141-0/+31
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 07ec212a VS: add target property VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !960
| * | VS: add target property VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname>Michael Stürmer2017-06-131-0/+31
| |/ | | | | | | Fixes: #16689
* | CUDA: When linking device code suppress CUDA 8.0+ deprecation warningsRobert Maynard2017-06-131-0/+7
|/ | | | | | The CUDA compiler automatic deprecation warnings are pure noise when doing device linking, and should be suppressed to reduce the amount of confusion from users.
* cmVisualStudio10TargetGenerator: Remove shadowing local variableBrad King2017-05-301-2/+0
|
* VS: Fix indentation of .vcxproj filesBrad King2017-05-241-12/+12
| | | | Patch-by: vvs31415 on gitlab.kitware.com
* VS: Write UseOfMfc tag only if CMAKE_MFC_FLAG is presentBrad King2017-05-221-10/+12
| | | | | | | Don't bother writing `UseOfMfc` to `.vcxproj` files when the value is just the default of `0`. This keeps the files cleaner. Patch-by: vvs31415 on gitlab.kitware.com
* VS: Fix .vcxproj ProjectGuid element caseBrad King2017-05-091-2/+2
| | | | | | | | The `.vcxproj` file format expects `ProjectGuid`, not `ProjectGUID`. The latter is expected by `.vcproj` files from VS 2008, so this was likely a typo when the VS 2010 generator was first introduced. Fixes: #11968
* VS: Use tool-specific flag table for COMPILE_FLAGS parsingPeter Ivanyi2017-05-031-1/+16
| | | | Fixes: #14710
* CUDA: Static libraries can now explicitly resolve device symbolsRobert Maynard2017-04-261-0/+4
| | | | | | | If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled it will now perform the device link step. The normal behavior is to delay calling device link until the static library is consumed by a shared library or an executable.
* CUDA: Visual Studio now properly delays device linkingRobert Maynard2017-04-261-0/+68
|
* Merge topic 'enable_ptx_compilation'Brad King2017-04-211-0/+6
|\ | | | | | | | | | | | | 23691d78 CUDA: Allow sources to be compiled to .ptx files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !725
| * CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-0/+6
| | | | | | | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* | Merge topic 'fix-vs2017-guid-braces'Brad King2017-04-211-7/+2
|\ \ | | | | | | | | | | | | | | | | | | fd7e8f33 VS: Fix project reference inspection in VS IDE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !727
| * | VS: Fix project reference inspection in VS IDERichard Walters2017-04-201-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The braces around project reference GUIDs for vcxproj projects were apparently optional in the past, but Visual Studio 2017 is more strict, displaying a warning, and not displaying project reference properties unless the braces are present. Fixes: #16820
* | | Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-4/+4
| |/ |/| | | | | | | Named enumeration values are much clearer at call sites and add more type safety.
* | cmGeneratorTarget: Drop default GetLinkerLanguage config argumentBrad King2017-04-171-1/+2
| | | | | | | | Update one remaining call site to avoid using the default.
* | VS: Teach generators how to mark per-config source filesBrad King2017-04-131-14/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Add internal infrastructure for looping over all sources for all configurations and generating each source with exclusion marks for configurations in which they do not participate. This does not yet make per-config sources available in general but does set up some of the needed infrastructure. Unfortunately doing this cleanly will require major refactoring of both the VS 7-9 generators and the VS 10+ generators (for separate reasons). Instead add some extra internal structures to carry information where we need it.
* | Merge topic 'include-style'Brad King2017-04-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1d829c86 Use quotes for non-system includes 26ee9e42 CPack: drop CPack prefix for includes 5afac50f cmConfigure: Ensure separate include block in headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !691
| * | Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* | | VS: Refactor loop over classified sourcesBrad King2017-04-111-83/+80
|/ / | | | | | | | | Loop over all sources at once instead of looking up and looping over each kind of source separately.
* | VS: Simplify logic collecting object library files as sourcesBrad King2017-04-111-45/+0
| | | | | | | | | | | | Object library files are already included by `GetExternalObjects` and `GetConfigCommonSourceFiles` so we don't need to call `UseObjectLibraries` to get them.
* | Merge topic 'ipo-policy-CMP0069'Brad King2017-03-311-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dfa8263f Implement interprocedural optimization for GNU compilers 1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled, e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com> Merge-request: !568