summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'vs-scan-for-modules'Brad King2024-01-101-5/+6
|\ | | | | | | | | | | | | | | | | | | 405dc7d19c Tests/CXXModules/scan_properties: use `ixx` extension 029ddc3410 cmVisualStudio10TargetGenerator: always specify scanning 6c9614cbf4 Tests/CXXModules: add a test case for VS generation without flags 34f4423851 cmVisualStudio10TargetGenerator: fix typo in flag name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9104
| * cmVisualStudio10TargetGenerator: always specify scanningBen Boeckel2024-01-061-3/+4
| | | | | | | | | | | | | | Set that sources should not be scanned on a target-wide basis and then enable on a per-TU basis as needed. Fixes: #25519
| * cmVisualStudio10TargetGenerator: fix typo in flag nameBen Boeckel2024-01-061-3/+3
| | | | | | | | | | It is case insensitive, so this only matches the official flag name and still works.
* | Merge topic 'cxxmodules-vs-no-synthetic-targets'Brad King2023-10-181-0/+9
|\ \ | |/ | | | | | | | | | | | | 17fd7fe2ae Tests/CXXModules: test Visual Studio synthetic target error badb6ab120 VS: Explicitly disallow C++ modules provided by imported targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8895
| * VS: Explicitly disallow C++ modules provided by imported targetsBen Boeckel2023-10-171-0/+9
| | | | | | | | | | | | | | The `-ifcOnly` flag is understood by MSBuild, but there are unresolved questions about how to integrate with with CMake's model. See: #25328
* | Add options to specify linker toolMarc Chevrier2023-10-131-0/+10
|/ | | | | | | | | | | | | | | | | | Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as the target property `LINKER_TYPE` to specify which linker must be used. The implementation of this capability is specified by variables specific to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`. Some definitions are provided as part of `CMake`. For example, to select the `LLVM` linker rather than the standard one, the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`. And, on `Apple`, `Linux` and some environments on `Windows`, the variable `CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows` environments based on `MSVC`, where the linker is used directly, the tool `lld-link.exe` will be used rather than `link.exe`. Fixes: #19174, #24254, #24990
* cxxmodules: rework control logic for scanning regular C++ sourcesBen Boeckel2023-10-021-9/+0
| | | | | | | | | | | Now that scanning support is no longer experimental, the logic for whether or not to scan C++ 20 sources is now important because all projects are now exposted to the logic. Make the scanning rules explicit in the documentation and rework the queries to localize all of the associated logic. A policy to handle the ultimate fallback logic will be implemented in a following commit.
* CUDA: Visual Studio propagate objects to device linkingRobert Maynard2023-09-221-14/+33
| | | | | | | | | When given objects via `target_link_libraries(consumer PRIVATE producer)` the VisualStudio solution adds the objects under as `<Object>` entries in the solution. This works for host side linking but isn't handled by the cuda msbuild extensions. So to work around this we manually add the objects as additional link items.
* Merge topic 'cxxmodules-non-compiled-source'Brad King2023-09-141-0/+20
|\ | | | | | | | | | | | | | | | | 24a9b00f83 Merge branch 'cxxmodules-non-compiled-source-release' into cxxmodules-non-compiled-source 458e3974a8 cxxmodules: detect and message about non-compiled sources Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8773
| * Merge branch 'cxxmodules-non-compiled-source-release' into ↵Ben Boeckel2023-09-121-0/+20
| |\ | | | | | | | | | | | | | | | | | | cxxmodules-non-compiled-source * cxxmodules-non-compiled-source-release: cxxmodules: detect and message about non-compiled sources
| | * cxxmodules: detect and message about non-compiled sourcesBen Boeckel2023-09-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Previously an internal error was raised which ended up causing an internal exception to be thrown. This is a typo situation that should fall into an explicit error. Fixes: #25207
* | | Merge topic 'vs-cuda-object-libs'Brad King2023-09-121-1/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 6ebff6ebf8 VS: Avoid unnecessary CUDA device linking for OBJECT libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8794
| * | VS: Avoid unnecessary CUDA device linking for OBJECT librariesRobert Maynard2023-09-111-1/+4
| |/ | | | | | | | | | | | | Without `CudaLink` fields, MSBuild tries to perform a device link step for object libraries with CUDA_SEPARABLE_COMPILATION on them even when not needed. This commonly was encountered when generating PTX or OPTIX-IR output.
* | Merge topic 'modules-better-messages'Brad King2023-08-251-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 571b5e1f2c cxxmodules: improve error messages for C++ module setup 8b4d32c18b cmStandardLevelResolver: add query for the effective standard level 17ddc4ac76 cmStandardLevelResolver: compare with static string literals 6f1dae2b01 cmStandardLevelResolver: use `cmStrCat` where possible 0d45d40e13 cmStandardLevelResolver: use character literals where possible Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8755
| * | cxxmodules: improve error messages for C++ module setupBen Boeckel2023-08-231-3/+3
| |/ | | | | | | | | | | | | Make it clear that: - the quoted string is a target name; and - C++ sources that export modules is the important detail.
* | cmGeneratorTarget: classify BMI-only C++ module sourcesBen Boeckel2023-08-171-0/+1
| |
* | cmSystemTools: move `ComputeCertificateThumbprint` to the only consumerBen Boeckel2023-08-081-2/+71
| | | | | | | | | | There's no need to have this API on `cmSystemTools` with only a single consumer.
* | cmCryptoHash: prefer to cmSystemTools::ComputeStringMD5Ben Boeckel2023-08-081-2/+4
| | | | | | | | | | | | | | The latter call is no longer post-bootstrap only since 596439b1bb (cmCustomCommandGenerator: Add option to transform depfile, 2020-10-05) via !5325. Convert callers to just use `cmCryptoHash` directly and remove the bootstrap guard.
* | Merge branch 'backport-revert-vs-show-cmake-files'Brad King2023-08-021-55/+1
|\ \ | |/
| * VS: Revert "Add CMake input files to ZERO_CHECK"Brad King2023-08-021-55/+1
| | | | | | | | | | | | | | | | | | | | | | Since commit df58dbb0e9 (VS: Add CMake input files to ZERO_CHECK, 2023-03-19, v3.27.0-rc1~157^2), projects that specify the same file both as input to `configure_file` and as the `MAIN_DEPENDENCY` of a custom command fail to configure. Revert the change pending further investigation. Add a test case demonstrating the problem. Issue: #24557 Fixes: #25149
* | cmComputeLinkInformation: prepare Item consumers for `OBJECT` librariesBen Boeckel2023-08-011-1/+2
| | | | | | | | | | | | | | | | After b665966933 (cmComputeLinkInformation: track `OBJECT` library dependencies, 2023-07-22), introduced in !8645 as a fix for #25112, `OBJECT` libraries were tracked in a separate member to reduce the risk of further regressions. This commit prepares consumers to handle `OBJECT` libraries once they start appearing as link items.
* | Merge topic 'windows-tidy-cmstrcat'Brad King2023-08-011-247/+278
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d58253d155 clang-tidy: fix `performance-faster-string-find` lints a19ec77200 clang-tidy: fix `readability-static-accessed-through-instance` lints 3d03629f20 cmWIXRichTextFormatWriter: remove identity cast 1df29567ac clang-tidy: fix `modernize-use-equals-default` lints 32fe862b8c clang-tidy: fix `readability-container-size-empty` lints 7eaab9a957 clang-tidy: fix `modernize-raw-string-literal` lints ffa49c23aa clang-tidy: fix `readability-else-after-return` lints 4489e9a85c clang-tidy: fix `modernize-use-auto` lints ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8668
| * | strings: use `emplace_back` with `cmStrCat` argumentsBen Boeckel2023-07-281-1/+1
| | |
| * | strings: use character literals where possibleBen Boeckel2023-07-281-44/+45
| | |
| * | cmStrCat: use in Windows-specific sourcesBen Boeckel2023-07-281-156/+184
| | |
| * | strings: simplify streaming sequencesBen Boeckel2023-07-271-5/+4
| | |
| * | strings: combine string literals where possibleBen Boeckel2023-07-271-5/+6
| | |
| * | strings: compare to static `string_view` instances in Windows-only codeBen Boeckel2023-07-271-71/+73
| | |
* | | IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
|/ / | | | | | | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* | Merge topic 'vs-cxxmodules-same-src-name'Brad King2023-06-301-0/+11
|\ \ | |/ | | | | | | | | | | | | b9c99830c5 VS: Fix C++ modules in source files with the same name Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8596
| * VS: Fix C++ modules in source files with the same nameBrad King2023-06-281-0/+11
| | | | | | | | | | | | | | | | | | When multiple source files in a single target have the same name, we already set `ObjectFileName` explicitly to avoid a `.obj` collision. For C++ module sources, set `Module{Output,Dependencies}File` to avoid `.ifc` and `.module.json` collisions. Fixes: #25038
* | Merge topic 'vs-cxxmodules-public-bmis'Brad King2023-06-231-0/+24
|\ \ | |/ | | | | | | | | | | d90a61d671 VS: Make C++ module BMIs public by default for shared libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8549
| * VS: Make C++ module BMIs public by default for shared librariesAndreas Weis2023-06-221-0/+24
| | | | | | | | | | Enable the `AllProjectBMIsArePublic` option for shared libraries in the VS project files when building with C++20 modules support.
* | cmVisualStudio10TargetGenerator: Remove unused VS-10-only codeBrad King2023-06-131-12/+0
|/ | | | | Remove code that is not used since commit 8d6f015d59 (Drop Visual Studio 10 2010 generator, 2022-09-26, v3.25.0-rc1~78^2).
* cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesetsBen Boeckel2023-05-311-3/+1
| | | | | There's no backing implementation for header units anyways, so just remove it for now.
* VS: Add support for C++ module internal partitions in VS 17.6 and newerBrad King2023-05-171-1/+8
| | | | | | | | VS 17.6 now implements `ScanSourceforModuleDependencies` using the same `cl /scanDependencies` scanner that our Ninja generator uses. It can distinguish module internal partitions from module interface units based on their content. Switch from `CompileAsCppModule` to `CompileAsCpp` for `CXX_MODULES` sources so that MSBuild can scan and classify them.
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-10/+10
|
* VS: Add CMake input files to ZERO_CHECKAlexander Neundorf2023-04-251-1/+55
| | | | | | | | | Add all cmake input files to the `ZERO_CHECK` project. Place files under `CMAKE_SOURCE_DIR` in a folder structure matching the directory structure. This way they are easier to find, and Visual Studio does not close them when reloading the project. Fixes: #24557
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-11/+7
|
* Merge topic 'support_cubin_fatbin_optix_cuda_output'Brad King2023-03-141-5/+20
|\ | | | | | | | | | | | | | | 2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8259
| * CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilationRobert Maynard2023-03-131-5/+20
| |
* | VS: Add policy to build custom commands concurrentlyBrad King2023-03-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 33c15ae2b9 (VS: Build custom commands concurrently when possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to custom commands in `.vcxproj` files, but that had to be reverted by commit abb1c12162 (VS: Revert "Build custom commands concurrently when possible", 2023-03-07, v3.26.0-rc6~3^2) because some projects may have custom commands that accidentally rely on serial execution in MSBuild. Add a policy to use `BuildInParallel` for custom commands in projects that have been updated to set the policy to `NEW`. Fixes: #18405
* | Merge topic 'vs-props-order'Brad King2023-03-081-1/+1
|\ \ | | | | | | | | | | | | | | | | | | d3c4c6d630 VS: Import default C++ props file before toolset-specific props file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8294
| * | VS: Import default C++ props file before toolset-specific props fileMatthew Voss2023-03-071-1/+1
| |/ | | | | | | | | | | | | This avoids overwriting toolset-specific settings like `VCRedistDir` with default settings. Fixes: #22420
* | Merge topic 'revert-vs-BuildInParallel'Brad King2023-03-081-7/+4
|\ \ | |/ |/| | | | | | | | | abb1c12162 VS: Revert "Build custom commands concurrently when possible" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8297
| * VS: Revert "Build custom commands concurrently when possible"Brad King2023-03-071-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 33c15ae2b9 (VS: Build custom commands concurrently when possible, 2023-01-19, v3.26.0-rc1~56^2) we add `BuildInParallel` to custom commands in `.vcxproj` files. However, this can break existing projects that implicitly rely on serial execution of custom commands. For example, custom commands in our FindCUDA module run MSVC (via nvcc) with a common `vc*.pdb` file, and therefore cannot run in parallel. Revert use of `BuildInParallel` while leaving most of the infrastructure for it in place. It can be restored later with an option or policy. Fixes: #24576 Issue: #18405
* | VS : Support WIN32_EXECUTABLE on SDK style projectsOlivier PENA2023-02-281-1/+5
| |
* | VS: Fix wrong appxManifest if OUTPUT_NAME != target nameSergey Markelov2023-02-161-10/+16
|/ | | | Fixes #24416
* VS: Honor compile options for ASM_NASMBrad King2023-01-261-0/+2
| | | | | | | | The Ninja and Makefile generators honor `target_compile_options` and friends for ASM_NASM `.asm` sources. Teach the VS generator to honor them too for consistency. Issue: #24289
* VS: Honor compile options for ASM_MARMASMBrad King2023-01-261-0/+2
| | | | | | | | The Ninja and Makefile generators honor `target_compile_options` and friends for ASM_MARMMASM `.asm` sources. Teach the VS generator to honor them too for consistency. Issue: #24289