summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Simplify XML codeVitaly Stakhovsky2018-03-271-24/+21
| | | | Get rid of suffix arguments
* cmVisualStudioGeneratorOptions: Move XML code to subclassesVitaly Stakhovsky2018-03-261-18/+48
|
* cmVisualStudio10TargetGenerator: fix indentationVitaly Stakhovsky2018-03-191-0/+3
| | | | Added printing empty string to get the right indentation.
* Merge topic 'vs-debugger-command'Brad King2018-03-191-0/+7
|\ | | | | | | | | | | | | 5a7113d8fb VS: Add target property VS_DEBUGGER_COMMAND Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1842
| * VS: Add target property VS_DEBUGGER_COMMANDHannes Mezger2018-03-141-0/+7
| | | | | | | | Fixes: #17819
* | cmVisualStudio10TargetGenerator: improved XML nestingVitaly Stakhovsky2018-03-161-68/+77
|/ | | | | Introduce an `Elem` helper class to track XML element state. This simplifies code in a few places, particularly OutputSourceSpecificFlags.
* cmVisualStudio10TargetGenerator: Use helpers for XML tagsVitaly Stakhovsky2018-03-071-312/+162
| | | | | Make the XML generating code smaller, more structured, and less error-prone. This is a step towards future XML refactoring.
* cmIDEOptions: use std::stringVitaly Stakhovsky2018-02-261-1/+1
|
* Merge topic 'project-references-csharp-17678'Brad King2018-02-261-0/+11
|\ | | | | | | | | | | | | 076a356c VS: Support C# project references Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1752
| * VS: Support C# project referencesRobert Dailey2018-02-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | When specifying a pure C# target in the `target_link_libraries()` call to another C++ target, a `<ProjectReference>` was setup for it (we wanted this) but also a corresponding `.lib` was added under `<AdditionalDependencies>` (we didn't want this). This change introduces a check that prevents `.lib` linker options from being used when the corresponding target for that library is a C# target. Fixes: #17678
* | VS: Convert loops to C++11, other C++ improvementsVitaly Stakhovsky2018-02-221-53/+35
|/
* cmVisualStudio10TargetGenerator: Make some data members const; simplifyVitaly Stakhovsky2018-02-061-59/+33
|
* cmVisualStudio10TargetGenerator: Limit scope of ConvertToWindowsSlash()Vitaly Stakhovsky2018-02-021-50/+52
| | | | It is no longer used outside this class, so its scope can be limited to file.
* Merge topic 'msvc_cuda_files_use_consistent_obj_names'Brad King2018-01-311-3/+14
|\ | | | | | | | | | | | | fa583869 CUDA: Use MSVC default pattern for naming object files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1722
| * CUDA: Use MSVC default pattern for naming object filesRobert Maynard2018-01-301-3/+14
| | | | | | | | | | The default that CUDA uses causes failures when you try to embed CUDA obj's into another target.
* | Merge topic 'vs-restore-order'Brad King2018-01-311-2/+2
|\ \ | |/ |/| | | | | | | | | 1fe66c46 VS: Restore the order of the AdditionalIncludeDirectories tag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1719
| * VS: Restore the order of the AdditionalIncludeDirectories tagVitaly Stakhovsky2018-01-301-2/+2
| | | | | | | | | | | | | | Move the `AdditionalIncludeDirectories` tag back to the VS-preferred location in `.vcxproj` files. Fixes: #17691
* | VS: Use newline for empty DebugInformationFormat tagsRobert Dailey2018-01-261-4/+5
|/ | | | | | | | | | | | | | | | | Previously, code wrote out empty tags for `<DebugInformationFormat>` like so: <DebugInformationFormat></DebugInformationFormat> This gets corrected by Visual Studio 2017 when saving the solution. The correction appears as: <DebugInformationFormat> </DebugInformationFormat> In the spirit of keeping the XML structure as close to what Visual Studio expects as possible, a newline is inserted after the opening tag in the empty case.
* Merge topic 'sourceFile-new-properties'Brad King2018-01-251-54/+77
|\ | | | | | | | | | | | | | | | | | | 04483111 sourceFile properties: add property INCLUDE_DIRECTORIES 3073bd1f VisualStudio generators: refactoring 78b1c2e0 sourceFile properties: add property COMPILE_OPTIONS 3f935e69 LocalGenerator: refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1596
| * sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-1/+18
| |
| * VisualStudio generators: refactoringMarc Chevrier2018-01-231-54/+41
| | | | | | | | | | | | Uniformize include directories handling. Fix memory leaks in class cmVisualStudio10TargetGenerator: OptionsMap uses now std::unique_ptr.
| * sourceFile properties: add property COMPILE_OPTIONSMarc Chevrier2018-01-231-1/+20
| | | | | | | | | | | | | | Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
* | Merge topic 'stdstring'Brad King2018-01-251-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 25243014 cmMakefile: use std::string in more methods; cleanup c_str()s Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1685
| * | cmMakefile: use std::string in more methods; cleanup c_str()sVitaly Stakhovsky2018-01-231-2/+2
| |/ | | | | | | | | Follow up commit 969c1f94ae (cmSourceGroup: code improvements; use std::string and C++11 loops, 2017-01-10).
* | cmVisualStudio10TargetGenerator: remove redundant space char in some tagsVitaly Stakhovsky2018-01-231-1/+1
|/ | | | Many source tags become identical to those created by MSVC
* Merge topic 'msvc_cuda_8_explicitly_specify_cuda_language'Brad King2018-01-181-0/+11
|\ | | | | | | | | | | | | 46abfedb CUDA: MSVC will now state files are cuda files when needed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1658
| * CUDA: MSVC will now state files are cuda files when neededRobert Maynard2018-01-121-0/+11
| | | | | | | | | | | | | | | | The MSVC CUDA build customizations before CUDA 9 would not explicitly add the -x cu option when building. This caused .cpp and .c files invoked with CudaCompile to be compiled as host code and not cuda. Now when we detect CUDA < 9 we will explicitly add this option to correct this bug.
* | Merge topic 'extend-compile-language-genex'Brad King2018-01-161-22/+45
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 506fda1c Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode c2f79c98 Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and Xcode 0795d25b cmVisualStudio10TargetGenerator: Factor out include dir computation 1ab4d186 cmLocalVisualStudio7Generator: Clarify variable name of compiled language 07e1a743 cmLocalVisualStudio7Generator: Clarify condition for target that compiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1657
| * Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and XcodeBrad King2018-01-121-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `INCLUDE_DIRECTORIES` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of include directories for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Fixes: #17435
| * Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and XcodeBrad King2018-01-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `COMPILE_DEFINITIONS` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of definitions for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Issue: #17435
| * cmVisualStudio10TargetGenerator: Factor out include dir computationBrad King2018-01-111-6/+13
| |
* | Merge topic 'cuda_allow_G_to_device_debugging_on_msvc'Brad King2018-01-121-0/+6
|\ \ | |/ |/| | | | | | | | | dcc606ad CUDA: Allow -G to control device debuging on MSVC. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1619
| * CUDA: Allow -G to control device debuging on MSVC.Robert Maynard2018-01-111-0/+6
| | | | | | | | Fixes #17551
* | VS: Modernize 'for' loops in cmVisualStudio10TargetGenerator to C++11Vitaly Stakhovsky2017-12-211-238/+167
|/ | | | 'auto' used for complex types
* Merge topic 'per-source-COMPILE_LANGUAGE-genex-support'Brad King2017-12-141-3/+5
|\ | | | | | | | | | | | | 10f58b27 Genex: Per-source $<COMPILE_LANGUAGE:...> support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1575
| * Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-3/+5
| | | | | | | | Fixes: #17542
* | cmIDEOptions: use std::string instead of const char*Vitaly Stakhovsky2017-12-091-4/+4
|/ | | | Revise method signatures to save a few c_str() conversions.
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-1/+10
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Merge topic 'src-genex-refactoring'Brad King2017-12-051-11/+6
|\ | | | | | | | | | | | | 6bffc13e Refactor per-source generator expression evaluation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1550
| * Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-11/+6
| | | | | | | | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* | Use CM_FALLTHROUGH in Windows-specific codeBrad King2017-12-041-0/+1
| | | | | | | | | | Some cases were missed by earlier sweeps due to not compiling Windows-specific code.
* | VS: Enable generation of CSharp projects without initial .cs filesMichael Stürmer2017-11-291-6/+10
|/ | | | fixes #17388
* VS: Order .vcxproj.filters files deterministicallyBrad King2017-11-151-3/+6
| | | | | | Sort source groups by name rather than arbitrary pointer values. Fixes: #17446
* cmSourceGroup: Return strings from GetName and GetFullNameBrad King2017-11-151-4/+4
|
* VS: Fix warnings in generated references to '.settings' filesYoshinori Tahara2017-11-091-6/+2
| | | | | | According to MSDN docs [1], LastGenOutput is just a file name. [1] https://msdn.microsoft.com/en-us/library/bb629388.aspx
* VS: Add source file property to set hlsl debug and optimization flagsJeremiah van Oosten2017-10-301-0/+22
| | | | | | | | Add `VS_SHADER_DISABLE_OPTIMIZATIONS` and `VS_SHADER_ENABLE_DEBUG` source file properties to control these settings on `.hlsl` files in the VS generator. Fixes: #17406
* Replace cmArray{Begin,End,Size} by their standard counterpartsMatthias Maennich2017-10-231-4/+5
| | | | | | | | | | | std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14 and an standard compliant implementation has been introduced within the 'cm' namespace: cm::{cbegin,cend}. std::size is only part of C++17, hence exposing a compliant implementation within namespace cm (cm::size). where possible, the standard implementations are reused.
* VS,Xcode: Add CMakeLists.txt sources without mutating targetsBrad King2017-10-181-0/+9
| | | | | | | | | | | | Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
* VS: Set CUDA TargetMachinePlatform explicitly on x64Brad King2017-10-171-0/+7
| | | | | | | | | | The `TargetMachinePlatform` setting tells CUDA what `--machine {32,64}` flag to pass to nvcc. While CUDA automatically chooses the proper default for the target architecture, it does not reflect this in the user-visible IDE settings. Set it explicitly to fix the user-visible setting. Fixes: #17355
* Merge topic 'vs-no-empty-link-version'Brad King2017-10-041-2/+0
|\ | | | | | | | | | | | | 0b419b99 VS: Do not emit empty linker Version tag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1332