summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'policy-cmp0111-iface'Brad King2020-11-241-1/+2
|\ | | | | | | | | | | | | | | | | 54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries 43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5530
| * cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE libraryBrad King2020-11-231-1/+2
| | | | | | | | Issue: #21470
| * Merge topic 'cuda_vs_skip_computation' into release-3.19Brad King2020-10-271-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | dd77dec18d VS: Don't compute CUDA options unless necessary e9109dec36 Merge branch 'ninja-multi-per-config-sources' into release-3.18 7c0de4175b Merge branch 'cmake-E-cat-binary' into release-3.18 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
* | | Reduce the scope of temporary cmProp variables and other improvementsVitaly Stakhovsky2020-11-051-8/+7
| | |
* | | Merge topic 'cuda_vs_skip_computation'Brad King2020-10-271-2/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | dd77dec18d VS: Don't compute CUDA options unless necessary Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
| * | VS: Don't compute CUDA options unless necessaryRaul Tambre2020-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following scenario (with 3.18 policies): 1. A CXX target is created. 2. CUDA language is enabled. CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be set. Because the CXX target was created before CUDA was enabled it wouldn't have it set. The Visual Studio generator would however end up computing CUDA compile options for the CXX target, which would result in a fatal error due to the policy violation. There doesn't seem to be a reason to do this for targets that don't actually use the CUDA language, so we can skip and generate the CXX target just fine. Fixes: #21341
* | | configure_file: Add option for user defined permissionsAsit Dhal2020-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | User defined permissions and options to copy permissions are implemented. Fixes: #20866
* | | VisualStudio: move PCH rules to projects when possible.Robert Maynard2020-10-201-19/+47
| |/ |/| | | | | | | | | | | | | | | | | This dramatically helps reduce the size of the solution files when PCH is enabled, since 2 entries per source file are removed. This also corrects a subtle issue where when UNITY + PCH was enabled, the PCH would not be used if a user explicitly tried to compile a source file from outside the unity group. This is possible via the compile source option in the Visual Studio GUI.
* | Merge topic 'csharp-source_group-bugfix'Brad King2020-10-061-1/+8
|\ \ | |/ | | | | | | | | | | 8d87cfdbf3 VS: Fix regression in C# source links Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5314
| * VS: Fix regression in C# source linksKinan Mahdi2020-10-051-1/+8
| | | | | | | | | | | | Fix logic used since commit ac6b18cd90 (CSharp: Add support for source groups with out-of-source builds, 2020-02-18, v3.18.0-rc1~645^2). Add a check of the physical file location for C# source groups.
* | Merge topic 'genexpr-for-mfc-flag'Brad King2020-10-011-1/+2
|\ \ | | | | | | | | | | | | | | | | | | c1f1eaf7a4 VS: Teach CMAKE_MFC_FLAG to support generator expressions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5283
| * | VS: Teach CMAKE_MFC_FLAG to support generator expressionsAndrey Starodubtsev2020-09-301-1/+2
| | |
* | | VS: Make ImportLibary generation optionalMark Jansen2020-09-301-5/+7
| | | | | | | | | | | | Fixes: #21180
* | | VS: Fix C language standard in target with C++ sourcesBrad King2020-09-291-0/+17
|/ / | | | | | | | | | | Add C-language standard to target-wide C++ settings. Fixes: #21195
* | Merge topic 'generate-target-order'Brad King2020-09-081-4/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aea465793e cmLocalVisualStudio7Generator: Consolidate target iteration 1527242745 cmLocalVisualStudio10Generator: Simplify target ordering by dependencies 48bf7192e7 cmLocalVisualStudio7Generator: Generate targets in dependency order 17aba9c9a6 cmLocalUnixMakefileGenerator3: Generate targets in dependency order 69ee18163b cmLocalGhsMultiGenerator: Generate targets in dependency order c4e296a609 cmGlobalGenerator: Compute a global target ordering respecting dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5187
| * | cmLocalVisualStudio7Generator: Consolidate target iterationBrad King2020-09-041-4/+0
| | | | | | | | | | | | | | | Combine iteration with `cmLocalVisualStudio10Generator` and dispatch generation of each target with a virtual `GenerateTarget` method.
* | | Refactor: Use cmToCStr()Vitaly Stakhovsky2020-09-031-1/+1
|/ /
* | cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-18/+18
| |
* | WIN32_EXECUTABLE: Add support for generator expressionsKyle Edwards2020-08-211-5/+15
| |
* | Add INTERFACE libraries to generated buildsystem if they have SOURCESBrad King2020-08-071-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTERFACE libraries were created with the intention of collecting usage requirements for use by other targets via `target_link_libraries`. Therefore they were not allowed to have SOURCES and were not included in the generated buildsystem. In practice, this has become limiting: * Header-only libraries do have sources, they just do not compile. Developers should be able to edit those sources (the header files) in their IDE. * Header-only libraries may need to generate some of their header files via custom commands. Some projects work around these limitations by pairing each interface library with an `add_custom_target` that makes the header files and custom commands appear in the generated buildsystem and in IDEs. Lift such limitations by allowing INTERFACE libraries to have SOURCES. For those with sources, add a corresponding build target to the generated buildsystem. Fixes: #19145
* | Merge topic 'cleanup-target-types'Brad King2020-07-281-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef796cc743 cmGeneratorTarget: Skip computing link implementation for custom targets 45158b2afe cmGeneratorTarget: Simplify logic in ComputeLinkInterfaceLibraries d6b1f5704e cmGeneratorTarget: Add missing nullptr checks 7695b67500 cmComputeTargetDepends: Add missing nullptr check 95b5df8646 cmGeneratorTarget: Skip computing languages for custom targets 2f0790df50 Factor out generator checks for filtering on non-compiling targets 422d9a0ab2 Factor out generator checks for filtering out interface libraries bce82df0aa cmGeneratorTarget: Remove unnecessary target type check in dependency tracing ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !5038
| * | Factor out generator checks for filtering out interface librariesBrad King2020-07-231-1/+1
| | | | | | | | | | | | | | | | | | Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell generators whether a target should participate in the generated build system.
* | | Merge branch 'backport-vs-lang-flags' into vs-lang-flagsBrad King2020-07-231-0/+6
|\ \ \ | |/ / |/| / | |/
| * VS: Restore toleration of target-wide -TP flag with MSVCBrad King2020-07-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3b547e2e4b (VS: Simplify logic adding source file C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) we only add a per-source language selection flag when the source file extension does not match the compiler's default. This approach breaks when a project adds a target-wide `-TP` flag. Although such projects likely did not work with non-VS generators, we did support them before in Visual Studio generators. Add a special case to tolerate such flags again. Fixes: #21005
* | Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* | cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-3/+3
| |
* | cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-1/+2
| |
* | configure_file: Add option to control file permissions transfer to copyRahul Gottipati2020-06-301-1/+1
| | | | | | | | Issue: #20866
* | Merge topic 'visual-studio-android'Brad King2020-06-261-11/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 6051a49c78 Visual Studio: Add Android support bbcaf9689e Refactor: Add IsAndroidGuiExecutable() method to cmTarget 14456923bd cmGlobalVisualStudio10Generator: Move variable initialization to header d5b5c19278 cmGlobalGenerator: FindMakeProgram() before CMakeDetermineSystem Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4898
| * | Visual Studio: Add Android supportKyle Edwards2020-06-241-8/+51
| | |
| * | Refactor: Add IsAndroidGuiExecutable() method to cmTargetKyle Edwards2020-06-181-3/+2
| |/
* | cmVisualStudio10TargetGenerator: Do not segfault on empty configRobert Maynard2020-06-241-2/+3
|/ | | | | The VS generator should error out earlier when no configurations are specified, but for now cover this symptom.
* VS: Restore compilation of '.C' sources as C++Brad King2020-06-111-3/+6
| | | | | | | | | Refactoring in commit 3b547e2e4b (VS: Simplify logic adding source file C/C++ language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) failed to account for MSVC's treatment of `.C` extensions as C. Add this special case to the logic to restore use of `-TP` for `.C` extensions. Fixes: #20822
* VS: Use StdOutEncoding for VS 16.7 Preview 3 and aboveJustin Goshi2020-06-031-5/+5
| | | | | | | | | | | | | | | | | VS 16.6 added a `StdOutEncoding` setting for custom commands to tell MSBuild that the output is encoded as UTF-8. In commit bc877a7e94 (Add support to indicate UTF-8 custom command pipe output encoding, 2020-04-08) CMake learned to add the setting in anticipation of the VS 16.6 release. However, when 16.6 was released it had a bug in the implementation of custom tasks with StdOutEncoding enabled that was exposed by our test suite. In commit 5058fb5401 (VS: Drop StdOutEncoding with VS 16.6 pending investigation, 2020-05-29) we disabled the setting pending investigation. The problem is fixed in VS 16.7 Preview 3, so restore use of the setting when a VS instance of at least that version is detected. Fixes: #20769
* VS: Drop StdOutEncoding with VS 16.6 pending investigationBrad King2020-05-291-2/+5
| | | | | | | | | The `StdOutEncoding` added to `.vcxproj` files since commit bc877a7e94 (Add support to indicate UTF-8 custom command pipe output encoding, 2020-04-08) breaks custom commands with symbolic outputs on VS 16.6.0. Disable it pending further investigation and possibly a fix in VS. Issue: #20769
* CUDA: Move VS CudaRuntime selection to be with rest of CUDA optionsBrad King2020-05-221-4/+11
|
* VS: Simplify logic adding source file C/C++ language flag to MSVCBrad King2020-05-181-21/+7
| | | | | | Do not add a target-wide language flag. We need a flag on an individual source file to explicitly specify the C or C++ language if and only if the source file extension does not imply it.
* VS: Compute managed type from an existing configurationBrad King2020-05-181-1/+2
| | | | | | It is not clear how multiple configurations should be handled here, but using an existing configuration is at least better than the empty configuration.
* VS: Write custom commands for sources from all configurationsBrad King2020-05-181-8/+14
|
* cmVisualStudio10TargetGenerator: Adopt Windows Store and Phone infrastructureBrad King2020-05-181-66/+94
| | | | | Move support for Resx, Xaml, Certificate, and AppManifest file handling out of cmGeneratorTarget.
* Merge topic 'vs-pch-compile-opts'Brad King2020-05-121-1/+1
|\ | | | | | | | | | | | | 6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4734
| * VS: Fix using PCH from source with COMPILE_OPTIONSBrad King2020-05-111-1/+1
| | | | | | | | | | | | | | If a source file gets per-source flags from both PCH and custom `COMPILE_OPTIONS`, combine them correctly. Fixes: #20694, #20456
* | GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-1/+1
| |
* | cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-130/+120
| |
* | VS: Add option for per-target PlatformToolsetJulien Jemine2020-04-291-2/+8
| | | | | | | | | | | | | | | | | | Add a `VS_PLATFORM_TOOLSET` target property to set `PlatformToolset` in the `.vcxproj` file for specific targets. Document that this is safe only when the named toolset uses the same underlying compiler as the primary toolset. Fixes: #17429
* | CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-6/+16
| | | | | | | | | | | | | | | | | | | | properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated to the device link step. To control which options are selected for normal link and device link steps, the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used. Fixes: #18265
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-4/+4
| |
* | Merge topic 'cmprop-source'Brad King2020-04-151-56/+58
|\ \ | | | | | | | | | | | | | | | | | | | | | e64fa5f1b6 cmSourceFile::GetProperty: return cmProp fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4603
| * | cmSourceFile::GetProperty: return cmPropVitaly Stakhovsky2020-04-141-56/+58
| | |
* | | Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-0/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.