1. 29 Jul, 2021 1 commit
    • Brad King's avatar
      VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries · 53aabe98
      Brad King authored
      Since commit 43919131 (Add INTERFACE libraries to generated
      buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the
      VS generator may process INTERFACE libraries.  Avoid code paths in the
      generator that process include directories because they should not be
      used by INTERFACE libraries since they do not compile anything.
      
      Fixes: #22494
      53aabe98
  2. 17 Jun, 2021 1 commit
  3. 09 Jun, 2021 1 commit
    • Brad King's avatar
      VS: Add support for add_custom_command DEPFILE · 526e2ef7
      Brad King authored
      Transform the depfile into MSBuild `AdditionalInputs` content.  Add
      MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for
      future builds without actually modifying the `.vcxproj` file.
      
      Fixes: #20286
      526e2ef7
  4. 29 May, 2021 1 commit
  5. 13 May, 2021 2 commits
  6. 11 May, 2021 1 commit
  7. 03 May, 2021 2 commits
  8. 18 Mar, 2021 1 commit
  9. 12 Mar, 2021 1 commit
    • Brad King's avatar
      VS: Fix '-T version=14.28' under VS 16.9 · 58a50a3a
      Brad King authored
      CMake accepts the toolset version that is default in the current VS
      version by matching the name later VS versions will use for the SxS
      props files.  It predicts the future name based on the first two
      components of the current VS version's default toolset.  However, this
      heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9
      because the latter's default toolset version is 14.28.29910, which did
      not increment the second version component (unprecedented in VS).
      
      Fix this by always using the requested version's SxS props file when it
      exists, even if it matches the first two components of the current VS
      version's default toolset.  Also add a special case for the name VS
      16.10 will use for VS 16.9's default toolset, so that it can be used
      with VS 16.9 too.
      
      Fixes: #21922
      58a50a3a
  10. 19 Feb, 2021 2 commits
  11. 05 Jan, 2021 1 commit
  12. 23 Nov, 2020 1 commit
  13. 05 Nov, 2020 1 commit
  14. 27 Oct, 2020 1 commit
    • Raul Tambre's avatar
      VS: Don't compute CUDA options unless necessary · dd77dec1
      Raul Tambre authored and Brad King's avatar Brad King committed
      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
      dd77dec1
  15. 24 Oct, 2020 1 commit
  16. 20 Oct, 2020 1 commit
    • Robert Maynard's avatar
      VisualStudio: move PCH rules to projects when possible. · 9df1f33c
      Robert Maynard authored
      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.
      9df1f33c
  17. 05 Oct, 2020 1 commit
    • KonanM's avatar
      VS: Fix regression in C# source links · 8d87cfdb
      KonanM authored and Brad King's avatar Brad King committed
      Fix logic used since commit ac6b18cd (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.
      8d87cfdb
  18. 30 Sep, 2020 2 commits
  19. 29 Sep, 2020 1 commit
  20. 04 Sep, 2020 1 commit
  21. 03 Sep, 2020 1 commit
  22. 02 Sep, 2020 1 commit
  23. 21 Aug, 2020 1 commit
  24. 07 Aug, 2020 1 commit
    • Brad King's avatar
      Add INTERFACE libraries to generated buildsystem if they have SOURCES · 43919131
      Brad King authored
      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
      43919131
  25. 23 Jul, 2020 2 commits
    • Brad King's avatar
      Factor out generator checks for filtering out interface libraries · 422d9a0a
      Brad King authored
      Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell
      generators whether a target should participate in the generated build
      system.
      422d9a0a
    • Brad King's avatar
      VS: Restore toleration of target-wide -TP flag with MSVC · c4109a1b
      Brad King authored
      Since commit 3b547e2e (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
      c4109a1b
  26. 22 Jul, 2020 1 commit
    • Jean-Christophe Fillion-Robin's avatar
      Fix typos identified using codespell · 20737380
      Jean-Christophe Fillion-Robin authored and Brad King's avatar Brad King committed
      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/cmFindPacka...
      20737380
  27. 14 Jul, 2020 1 commit
  28. 03 Jul, 2020 1 commit
  29. 30 Jun, 2020 1 commit
  30. 24 Jun, 2020 2 commits
  31. 18 Jun, 2020 1 commit
  32. 11 Jun, 2020 1 commit
    • Brad King's avatar
      VS: Restore compilation of '.C' sources as C++ · 5c04e77e
      Brad King authored
      Refactoring in commit 3b547e2e (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
      5c04e77e
  33. 03 Jun, 2020 1 commit
    • Justin Goshi's avatar
      VS: Use StdOutEncoding for VS 16.7 Preview 3 and above · e219527a
      Justin Goshi authored and Brad King's avatar Brad King committed
      VS 16.6 added a `StdOutEncoding` setting for custom commands to tell
      MSBuild that the output is encoded as UTF-8.  In commit bc877a7e (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 5058fb54 (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
      e219527a
  34. 29 May, 2020 1 commit