summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'vs-ReferenceOutputAssembly-conditions'Brad King2019-09-261-26/+2
|\ | | | | | | | | | | | | | | | | 4dc8c153ec Tests: Teach VSWinStorePhone to verify the content of generated xap 481070a78a Tests: Teach VSWinStorePhone to verify the content of generated appx/msix acdb326610 VS: Do not reference output assemblies of targets with no output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3778
| * VS: Do not reference output assemblies of targets with no outputVedran Vujinovic2019-09-191-26/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our logic that sets `ReferenceOutputAssembly` in `ProjectReference` has accumulated a series of conditions for different cases in which the referenced target has no output. Simplify the condition to check `GetManagedType` directly for cases with no output. This will explicitly turn off `ReferenceOutputAssembly` in `ProjectReference` for utility (i.e. `add_custom_target`) and special targets (i.e. `ZERO_CHECK`, etc.), and allowing reference of target dependencies that produce some output. Fixes: #19665
* | Merge topic 'vs-16.4-custom-commands'Brad King2019-09-251-2/+16
|\ \ | | | | | | | | | | | | | | | | | | 0578239d3a VS: Tell VS 16.4 not to verify SYMBOLIC custom command outputs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3860
| * | VS: Tell VS 16.4 not to verify SYMBOLIC custom command outputsBrad King2019-09-241-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VS 16.4 introduces an additional check on `CustomBuild` rules that warns if the outputs of the command are not created. However, CMake supports marking outputs with the `SYMBOLIC` property to indicate that they will not actually be generated. That property is used by Makefile and Ninja generators but has not been needed by the VS generators before. Teach the VS generator to disable `VerifyInputsAndOutputsExist` in custom build rules that have a symbolic output. Fixes: #19737
* | | cmGeneratorExpression: Add cmGeneratorExpression::Evaluate utilityDaniel Eiband2019-09-231-44/+16
| | | | | | | | | | | | | | | | | | | | | cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is needed or an instance of cmCompiledGeneratorExpression cannot be cached. Fixes: #19686
* | | cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* | Merge topic 'cuda_resolve_device_symbols_on_static_lib_collect_deps_properly'Brad King2019-09-091-0/+76
|\ \ | | | | | | | | | | | | | | | | | | 2d7bb13da7 CUDA: static lib device linking computes required static libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3748
| * | CUDA: static lib device linking computes required static libsRobert Maynard2019-09-051-0/+76
| | | | | | | | | | | | | | | | | | Previously the CMake didn't compute the required set of libraries needed to properly device link a static library when CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
* | | Merge topic 'use-using'Brad King2019-09-061-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1d3f5ebb0d clang-tidy: Enable check modernize-use-using a1ddf2d0ba clang-tidy: Replace typedef with using Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3782
| * | | clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-7/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* | | Merge topic 'unity-build'Brad King2019-09-051-0/+51
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7786a05c70 Unity build: Add XCode support 1353802af3 Unity build: Add unit tests 8dfeb5d278 Unity build: Add support for Visual Studio generator 7114c141e2 Unity build: Add support for Ninja and Makefile generators Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Merge-request: !3611
| * | Unity build: Add support for Visual Studio generatorCristian Adam2019-08-291-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | It works as expected in Visual Studio. Visual Studio 2017 will (partially) benefit from the build in support for unity builds. The custom unity sources are used, because the build in support doesn't allow batching of certain number of files. It can do only batching by directory.
* | | Merge topic 'vs-cuda-custom-dir'Brad King2019-09-031-4/+25
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 25f29b9741 cuda: Adapted tests to work with modified cuda toolset ee86770a3f cuda: Added docs for extended cuda toolset 0ad180d712 cuda: Extend cuda compiler detection to work with custom cuda path 55b0532128 cuda: Extend vs10 target generator to use custom cuda path df0247a371 cuda: Extend toolset argument to accept path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3713
| * | cuda: Extend vs10 target generator to use custom cuda pathBenjamin Wozniak2019-08-301-4/+25
| | |
* | | Merge topic 'precompile-headers'Brad King2019-08-291-1/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8da78d4efe Precompile headers: Update documentation 5772930164 Precompile headers: Add unit tests 519606704e Precompile headers: Add support for Visual Studio generators 28be170fbc Precompile headers: Add support for Xcode generator b8626261e9 Precompile headers: Add methods to generate PCH sources 375d01c680 PCH: add example/test 9b6797e71d PCH: add target_precompile_headers command 0467a2f91b PCH: add PRECOMPILE_HEADERS to special properties Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Acked-by: Ivan171 <heavenandhell171@gmail.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Steve Mokris <smokris@softpixel.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Danila Malyutin <flashmozzg@gmail.com> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Acked-by: Lucas Zhao <zhaopf6@163.com> Merge-request: !3553
| * | | Precompile headers: Add support for Visual Studio generatorsCristian Adam2019-08-281-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Tested with Visual C++ 2017 on Windows. Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
* | | | Merge topic 'vs-ConfigurationType-genex'Brad King2019-08-281-1/+4
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 8909a450a6 VS: Add support for generator expressions to VS_CONFIGURATION_TYPE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3746
| * | | VS: Add support for generator expressions to VS_CONFIGURATION_TYPEDaniel Eiband2019-08-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator expressions in target property VS_CONFIGURATION_TYPE might be used to set the ConfigurationType to Utility for certain configurations to not build the target while still linking to the target in other configurations. Fixes: #19613
* | | | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* | | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-53/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* | | Merge topic 'cm-contains'Brad King2019-08-211-6/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
| * | cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-6/+3
| | | | | | | | | | | | Also, use the new function where applicable.
* | | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-10/+10
|/ / | | | | | | | | | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* | Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-5/+5
| |
* | Merge topic 'vs-spectre-off'Brad King2019-07-311-4/+7
|\ \ | |/ | | | | | | | | | | f9b7c660d7 VS: Fix mapping of `-Qspectre-` flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3629
| * VS: Fix mapping of `-Qspectre-` flagBrad King2019-07-301-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | The mapping for this flag was added by commit 43aa632f57 (VS: Populate `-Qspectre-` flag table entry for v142, 2019-01-24, v3.14.0-rc1~74^2~7). However, it did not do anything because the special logic added by commit bb60ed6e72 (VS: Add flag table entry for -Qspectre, 2018-10-08, v3.13.0-rc1~4^2) to move the `SpectreMitigation` element from `ClCompile` to the top level only handled the presence of the setting and not its value. Extend the special logic to carry the value too. Fixes: #19535
* | Merge topic 'vs-asmlist-dir'Brad King2019-07-191-2/+1
|\ \ | |/ | | | | | | | | | | c1fc6c80c7 VS: Place intermediate files in the "ASM List Location" next to objects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3569
| * VS: Place intermediate files in the "ASM List Location" next to objectsBrad King2019-07-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The `AssemblerListingLocation` setting in VS project files is meant for intermediate files created during the build much like object files. When the VS 7 generator was first under development, commit 49aebe6c99 (new arch, 2002-09-04) placed both object files and the ASM list location in the same directory. Later commit f9aef0e422 (Generator now creates a separate intermediate files directory for each target, 2005-07-27) moved the object files to a per-target directory but the ASM list location was not moved with them. Move it now. Fixes: #19480
* | Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
| |
* | Merge topic 'object-library-sbcs'Brad King2019-07-121-1/+1
|\ \ | |/ | | | | | | | | | | 54290adcba VS: Fix SBCS support for object libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3537
| * VS: Fix SBCS support for object librariesBrad King2019-07-121-1/+1
| | | | | | | | | | | | | | | | In commit 3a53005f7d (Build object library targets in VS, 2012-03-12, v2.8.8~29^2~13) we updated the condition for unicode but accidentally left out the SBCS case support for object libraries. Fixes: #19469
* | IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | | | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* | Merge topic 'cuda-no-device-link-when-disabled'Brad King2019-07-021-1/+1
|\ \ | |/ | | | | | | | | | | a4d502a5bf CUDA: Do not device link if CUDA is not an enabled language Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3491
| * CUDA: Do not device link if CUDA is not an enabled languageRobert Maynard2019-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2) assumed that CUDA properties would be set only if CUDA is enabled. We cannot do a device link step if we do not have the CUDA language enabled. This was discovered as some projects unconditionally set CUDA properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA language has not been enabled. Fixes: #19432
* | Merge topic 'vs-dpi-aware'Brad King2019-06-271-8/+25
|\ \ | | | | | | | | | | | | | | | | | | cd92f8f8bf VS: Add VS_DPI_AWARE target property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3418
| * | VS: Add VS_DPI_AWARE target propertyMatt Weir2019-06-261-8/+25
| | | | | | | | | | | | | | | Enables setting the visual studio project property for Manifests, controlling the DPI Aware setting.
* | | Merge topic 'cuda-msvc-runtime-library'Brad King2019-06-271-15/+11
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | 8fbd25772f CUDA: Implement MSVC runtime library abstraction 07807a2006 VS: Use AddLanguageFlags to de-duplicate CMAKE_{CUDA,ASM*}_FLAGS lookup Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3485
| * | VS: Use AddLanguageFlags to de-duplicate CMAKE_{CUDA,ASM*}_FLAGS lookupBrad King2019-06-261-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | Apply the refactoring from commit 707283981f (VS: Use AddLanguageFlags to de-duplicate CMAKE_<LANG>_FLAGS* lookup, 2019-04-01, v3.15.0-rc1~300^2) to the CUDA, ASM_MASM, and ASM_NASM languages too. In particular, CUDA needs the MSVC runtime library selection logic in the `AddLanguageFlags` method that is used by other generators.
* | | VS10Generator: add project properties to enable WindowsCE deployment.Wil Stark2019-06-191-0/+5
| |/ |/| | | | | Fixes: #19408
* | cmPropertyMap: Make std::map container privateSebastian Holtermann2019-06-081-12/+12
|/
* Merge topic 'vs-add-package-reference'Brad King2019-05-311-0/+28
|\ | | | | | | | | | | | | | | 42e14d90b1 VS: Added support for VS package references for nuget Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Leonid Pospelov <pospelovlm@yandex.ru> Merge-request: !3389
| * VS: Added support for VS package references for nugetKinan Mahdi2019-05-301-0/+28
| |
* | Merge topic 'vs-depends-dedup'Brad King2019-05-311-19/+43
|\ \ | |/ |/| | | | | | | | | | | | | 42bc67bd43 VS: De-duplicate custom command dependencies d03a6fc857 VS: Clarify name of custom commands AdditionalInputs variable fcedf8e552 VS: Isolate custom command input/output generation scopes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3388
| * VS: De-duplicate custom command dependenciesFrans van Dorsselaer2019-05-301-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid listing the same input more than once in custom commands generated in `.vcxproj` and `.csproj` files. In the case of a `.vcxproj` file additionally avoid listing the source to which the command is attached since it is already implicitly a dependency. This is a nice cleanup and also works around a VS 2019 16.1 regression in MSBuild dependency checking. Starting with that version, MSBuild now re-builds custom commands when the list of dependencies has changed. However, its check is confused by duplicate dependencies. De-duplicating them avoids this problem. Co-Author: Brad King <brad.king@kitware.com> Fixes: #19303
| * VS: Clarify name of custom commands AdditionalInputs variableFrans van Dorsselaer2019-05-301-8/+8
| |
| * VS: Isolate custom command input/output generation scopesBrad King2019-05-301-12/+16
| |
* | Merge topic 'remove_unneeded_device_link_calls'Brad King2019-05-221-15/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking 3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3320
| * | CUDA: More exhaustive checks to determine when to do device linkingRobert Maynard2019-05-211-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CMake used fairly naive logic to determine when to do device linking which caused unnecessary device linking to occur frequently. We now use a more exhaustive algorithm to determine when we have a need for device linking. Fixes: #19238
* | | VS: Factor out helper to compute ApplicationTypeRevisionBrad King2019-05-211-8/+8
| | | | | | | | | | | | This is the first two components of `CMAKE_SYSTEM_VERSION`.
* | | Source: std::string related cleanupVitaly Stakhovsky2019-05-151-3/+3
|/ /