summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
* | | Merge topic 'vs-rc-defines'Brad King2017-03-291-5/+7
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds 79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache c77194ec VS: Honor preprocessor definitions in RC flags 1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs 8a619e8c cmIDEOptions: Add GetDefines method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !640
| * VS: Honor preprocessor definitions in RC flagsBrad King2017-03-281-5/+7
| | | | | | | | | | | | | | | | | | The VS generators use the C (or CXX) preprocessor definitions for the Windows Resource Compiler tool. This causes definitions parsed out of `CMAKE_RC_FLAGS[_<CONFIG>]` variables to be dropped. Fix the implementation to preserve both. Issue: #16745
| * Merge branch 'csproj_add_free_source_tags' into releaseBrad King2017-03-021-47/+46
| |\
* | \ Merge topic 'module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS'Brad King2017-03-221-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 075f6454 Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` files 21c4ec4f cmGlobalVisualStudioGenerator: Simplify __create_def command generation 24361a45 bindexplib: Add support for parsing and integrating `.def` files 845c4824 bindexplib: Add method for parsing and integrating `.def` files 4f90e793 bindexplib: Revise coding style of CMake-specific methods Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !581
| * | | Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` filesBrad King2017-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols found in object files explicitly given to the linker. However, the linker may also find additional symbols in dependencies and copy them into the linked binary (e.g. from `msvcrt.lib`). Provide a way to export an explicit list of such symbols by adding a `.def` file as a source file. Fixes: #16473
* | | | Merge topic 'cuda-vs'Brad King2017-03-131-6/+144
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 65481a60 CUDA: Work around VS limitation in CudaOnly.WithDefs test 8cae24a1 VS: Add more CUDA flag table entries 6ca4f222 VS: Add support for the CUDA_SEPARABLE_COMPILATION property 94255511 VS: Select CUDA code generation architectures 253594d0 VS: Select the CUDA runtime library 4def02a3 VS: Place CUDA host compiler options in proper project file fields 29f07b08 VS: Do not pass CUDA compile options to C compiler b966f489 VS: Do not use absolute paths to CUDA sources ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !566
| * | | VS: Add support for the CUDA_SEPARABLE_COMPILATION propertyBrad King2017-03-101-0/+4
| | | |
| * | | VS: Select CUDA code generation architecturesBrad King2017-03-101-0/+2
| | | | | | | | | | | | | | | | | | | | Parse the `-gencode=`, `-arch`, and `-code` flags and generate a `CodeGeneration` field in the project file.
| * | | VS: Select the CUDA runtime libraryBrad King2017-03-101-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | Parse the `-cudart=` option and add a corresponding `CudaRuntime` field to the generated project file. Also add a matching `.lib` to the list of libraries linked.
| * | | VS: Place CUDA host compiler options in proper project file fieldsBrad King2017-03-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CUDA Toolkit's VS integration provides abstractions for host compiler options for `nvcc` to pass through `-Xcompiler` to the host MSVC. Populate our secondary flag table and use it to remove flags from the `AdditionalCompilerOptions` in favor of their abstractions. Unfortunately a bug in the CUDA 8.0 VS integration prevents us from passing anything in `AdditionalCompilerOptions` reliably. After taking out the flags that have dedicated abstractions, drop the rest.
| * | | VS: Do not pass CUDA compile options to C compilerBrad King2017-03-101-2/+4
| | | |
| * | | VS: Do not use absolute paths to CUDA sourcesBrad King2017-03-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The CUDA Toolkit's VS integration does not properly compute the intermediate files directory location when the path to the source file is absolute.
| * | | VS: Add basic infrastructure for CUDA generationBrad King2017-03-101-0/+103
| | | | | | | | | | | | | | | | Generate the `CudaCompile` elements in `.vcxproj` files.
* | | | Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a `.def` file as a source. Only one of these could be used within a single target before anyway.
* | | | Refactor module definition file selectionBrad King2017-03-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Create a `ModuleDefinitionInfo` structure for each configuration of a target to hold corresponding information about the selected module definition file (`.def` source).
* | | | Refactor module definition source enumerationBrad King2017-03-091-4/+3
|/ / / | | | | | | | | | Add a `cmGeneratorTarget::GetModuleDefinitionSources` method.
* | | Merge topic 'csproj_add_free_source_tags'Brad King2017-03-021-47/+46
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 506207f9 VS: add test for VS_CSHARP_* source file property a202749c VS: add CSharpUtilities module 9588d0a2 VS: add VS_CSHARP_<tagname> sourcefile property
| * | VS: add VS_CSHARP_<tagname> sourcefile propertyMichael Stürmer2017-03-011-47/+46
| | |
* | | Merge topic 'vcxproj-indentation'Brad King2017-02-241-0/+1
|\ \ \ | | |/ | |/| | | | | | | 2cb165e8 VS: Fix .vcxproj indentation
| * | VS: Fix .vcxproj indentationBrad King2017-02-231-0/+1
| |/ | | | | | | | | | | In commit v3.8.0-rc1~87^2~1 (VS: added support for C#, 2017-01-09) we removed what looked like a no-op streaming operation but in fact it is responsible for applying indentation. Restore the line.
* | VS: Refactor AdditionalOptions generationBrad King2017-02-151-7/+7
| | | | | | | | | | | | Store unknown flags directly in a flag map entry for `AdditionalOptions` instead of having a separate member for them. This avoids duplicating the output generation logic for the entry.
* | VS: Place CMAKE_<LANG>_STANDARD_LIBRARIES after other librariesBrad King2017-02-141-8/+8
| | | | | | | | | | | | | | Make the VS generator consistent with the Ninja and Makefile generators that place the libraries listed in this variable after other libraries on the link command line. These system libraries never depend on the project libraries.
* | VS: Refactor parsing of CMAKE_<LANG>_STANDARD_LIBRARIESBrad King2017-02-141-14/+2
| | | | | | | | | | | | Parse the value as a command line string just as the MS CRT would. This makes the VS generator behavior consistent with how the string is used by the Ninja and Makefile generators.
* | VS: Add support for ASM_NASM languageEvgeny Fimochkin2017-02-071-0/+105
|/ | | | Fixes: #16469
* VS: removed usage of relative paths for C# targets in in-source buildsMichael Stürmer2017-01-181-6/+0
|
* VS: improve handling of source files with special extensions in .csprojMichael Stürmer2017-01-181-19/+184
| | | | | | | | | | | | Mainly <Link> and <DependentUpon> tags are added to connect generated and manually edited files. Special file extensions that are take care of are: - .Designer.cs - .xaml.cs - .settings - .resx - .xaml
* VS: added support for C# (for Visual Studio 2010, 2012, 2013, 2015)Michael Stürmer2017-01-131-69/+362
|