summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * VS: Do not emit empty linker Version tagVitaly Stakhovsky2017-10-031-2/+0
| | | | | | | | | | This empty element does nothing, so simply remove it to simplify generated `.vcxproj` files.
* | VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS propertyBrad King2017-10-031-2/+2
|/ | | | | | This already worked in other generators. Also add a test case. Fixes: #17314
* Merge topic 'add-vs-shader-properties'Brad King2017-09-291-0/+34
|\ | | | | | | | | | | | | 49dab3eb VS: Add VS_SHADER_OUTPUT_HEADER_FILE and VS_SHADER_VARIABLE_NAME properties. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1319
| * VS: Add VS_SHADER_OUTPUT_HEADER_FILE and VS_SHADER_VARIABLE_NAME properties.Kevin M. Godby2017-09-271-0/+34
| | | | | | | | | | | | | | | | | | | | The VS_SHADER_OUTPUT_HEADER_FILE property is the name of the generated header file containing the object code of the shader. The VS_SHADER_VARIABLE_NAME property is the name of the variable containing the object code in the above header file. Signed-off-by: Kevin M. Godby <kevin@godby.org>
* | Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-24/+26
|/ | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Merge topic 'string-clear'Brad King2017-09-191-1/+1
|\ | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
| |
* | Merge topic 'vs-manifestuac-flag-map'Brad King2017-09-191-0/+1
|\ \ | |/ |/| | | | | | | | | 3232f84c VS: Fix MANIFESTUAC link flag map to .vcxproj elements Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !526
| * VS: Fix MANIFESTUAC link flag map to .vcxproj elementscomicfans2017-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | Add special parsing of the flags given in `/MANIFESTUAC:"..."` in order to map them correctly to `.vcxproj` elements. Keep the old incorrect flag table entries for `uiAccess` and `level` flags for compatibility even though they do not really exist. Fixes: #16563
* | Merge topic 'MsvcArm64'Brad King2017-09-131-0/+4
|\ \ | | | | | | | | | | | | | | | | | | bc7c94fe MSVC: Add support for ARM64 architecture Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1215
| * | MSVC: Add support for ARM64 architectureMinmin Gong2017-09-121-0/+4
| | | | | | | | | | | | | | | | | | Visual Studio 15.4 adds support for this architecture. Fixes: #17213
* | | Merge topic 'vs-clang-llvm-support'Brad King2017-09-121-2/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 8a4755ca VS: Update support for LLVM-vs* toolsets from LLVM 5.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1231
| * | VS: Update support for LLVM-vs* toolsets from LLVM 5.0Konstantin Ivlev2017-09-111-2/+1
| |/ | | | | | | | | | | | | | | | | Revert commit v3.7.0-rc1~25^2 (VS: Recognize VS/LLVM toolset names as Clang, 2016-09-28). Since at least LLVM 5.0 the VS integration of the LLVM toolchain now mimics cl and accepts MSVC-style command-line arguments (unlike Microsoft Clang/C2). Fixes: #17193, #17235
* | Merge topic 'vs_improve_custom_command'Brad King2017-09-111-5/+7
|\ \ | |/ |/| | | | | | | | | | | 9ed24280 VS: only add custom command line if it is not empty 34c4108b add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1050
| * VS: only add custom command line if it is not emptyMichael Stürmer2017-09-041-5/+7
| |
* | Merge branch 'backport-vs-csharp-ref-no-asm' into vs-csharp-ref-no-asmBrad King2017-09-051-0/+7
|\ \ | |/ |/|
| * VS: Do not reference output assemblies if not possible for CSharp targetMichael Stürmer2017-09-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to CXX targets, 2017-06-20) CSharp targets get `ProjectReference` entries to their dependencies. This causes VS to also reference the dependency's output assembly by default, which is incorrect for non-managed targets. Fix this by setting `ReferenceOutputAssembly` to `false` for targets that can't provide output assemblies. Unmanaged C++ targets (shared libs & executables) can still be referenced and a warning will be shown in the IDE but the build will not break anymore. Fixes: #17172