Merge topic 'better-file-download-failure-msg'

8c3cf2716a file(DOWNLOAD EXPECTED_HASH): better error message when download failed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7888
diff --git a/Help/envvar/ASM_DIALECT.rst b/Help/envvar/ASM_DIALECT.rst
index c89515e..11dbe5a 100644
--- a/Help/envvar/ASM_DIALECT.rst
+++ b/Help/envvar/ASM_DIALECT.rst
@@ -4,8 +4,14 @@
 .. include:: ENV_VAR.txt
 
 Preferred executable for compiling a specific dialect of assembly language
-files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM`` (Netwide Assembler),
-``ASM_MASM`` (Microsoft Assembler) or ``ASM-ATT`` (Assembler AT&T).
+files. ``ASM<DIALECT>`` can be one of:
+
+* ``ASM``
+* ``ASM_NASM`` (Netwide Assembler)
+* ``ASM_MASM`` (Microsoft Assembler)
+* ``ASM_MARMASM`` (Microsoft ARM Assembler)
+* ``ASM-ATT`` (Assembler AT&T)
+
 Will only be used by CMake on the first configuration to determine
 ``ASM<DIALECT>`` compiler, after which the value for ``ASM<DIALECT>`` is stored
 in the cache as
diff --git a/Help/envvar/ASM_DIALECTFLAGS.rst b/Help/envvar/ASM_DIALECTFLAGS.rst
index 2af4b58..f13efbb 100644
--- a/Help/envvar/ASM_DIALECTFLAGS.rst
+++ b/Help/envvar/ASM_DIALECTFLAGS.rst
@@ -9,6 +9,7 @@
 * ``ASMFLAGS``
 * ``ASM_NASMFLAGS``
 * ``ASM_MASMFLAGS``
+* ``ASM_MARMASMFLAGS``
 * ``ASM-ATTFLAGS``
 
 .. |CMAKE_LANG_FLAGS| replace:: :variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`
diff --git a/Help/manual/cmake-file-api.7.rst b/Help/manual/cmake-file-api.7.rst
index 4b8ac65..65defb6 100644
--- a/Help/manual/cmake-file-api.7.rst
+++ b/Help/manual/cmake-file-api.7.rst
@@ -425,7 +425,7 @@
 
   {
     "kind": "codemodel",
-    "version": { "major": 2, "minor": 4 },
+    "version": { "major": 2, "minor": 5 },
     "paths": {
       "source": "/path/to/top-level-source-dir",
       "build": "/path/to/top-level-build-dir"
@@ -1071,6 +1071,27 @@
     available.  The value is an unsigned integer 0-based index into
     the ``backtraceGraph`` member's ``nodes`` array.
 
+``fileSets``
+  A JSON array of entries corresponding to the target's file sets. Each entry
+  is a JSON object with members:
+
+  ``name``
+    A string specifying the name of the file set.
+
+  ``type``
+    A string specifying the type of the file set.  See
+    :command:`target_sources` supported file set types.
+
+  ``visibility``
+    A string specifying the visibility of the file set; one of ``PUBLIC``,
+    ``PRIVATE``, or ``INTERFACE``.
+
+  ``baseDirectories``
+    A JSON array of strings specifying the base directories containing sources
+    in the file set.
+
+  This field was added in codemodel version 2.5.
+
 ``sources``
   A JSON array of entries corresponding to the target's source files.
   Each entry is a JSON object with members:
@@ -1096,6 +1117,13 @@
     Optional member that is present with boolean value ``true`` if
     the source is :prop_sf:`GENERATED`.
 
+  ``fileSetIndex``
+    Optional member that is present when the source is part of a file set.
+    The value is an unsigned integer 0-based index into the ``fileSets``
+    array.
+
+    This field was added in codemodel version 2.5.
+
   ``backtrace``
     Optional member that is present when a CMake language backtrace to
     the :command:`target_sources`, :command:`add_executable`,
diff --git a/Help/release/dev/file-api-file-sets.rst b/Help/release/dev/file-api-file-sets.rst
new file mode 100644
index 0000000..8a8b8d3
--- /dev/null
+++ b/Help/release/dev/file-api-file-sets.rst
@@ -0,0 +1,9 @@
+file-api-file-sets
+------------------
+
+* The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has
+  been updated to 2.5.
+
+* The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object
+  gained a new ``fileSets`` field and associated ``fileSetIndex``
+  field to ``sources`` objects.
diff --git a/Help/release/dev/marmasm-language.rst b/Help/release/dev/marmasm-language.rst
new file mode 100644
index 0000000..2101e6c
--- /dev/null
+++ b/Help/release/dev/marmasm-language.rst
@@ -0,0 +1,4 @@
+marmasm-language
+----------------
+
+* The ``ASM_MARMASM`` language was added to support the Microsoft ARM assembler language.
diff --git a/Modules/CMakeASM_MARMASMInformation.cmake b/Modules/CMakeASM_MARMASMInformation.cmake
new file mode 100644
index 0000000..ac81097
--- /dev/null
+++ b/Modules/CMakeASM_MARMASMInformation.cmake
@@ -0,0 +1,20 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# support for the MS ARM assembler, marmasm and marmasm64
+
+set(ASM_DIALECT "_MARMASM")
+
+set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
+
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
+
+# The ASM_MARMASM compiler id for this compiler is "MSVC", so fill out the runtime library table.
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded         "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL      "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug    "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
+
+include(CMakeASMInformation)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineASM_MARMASMCompiler.cmake b/Modules/CMakeDetermineASM_MARMASMCompiler.cmake
new file mode 100644
index 0000000..26714dd
--- /dev/null
+++ b/Modules/CMakeDetermineASM_MARMASMCompiler.cmake
@@ -0,0 +1,18 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# Find the MS ARM assembler (marmasm or marmasm64)
+
+set(ASM_DIALECT "_MARMASM")
+
+# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
+if(";${CMAKE_VS_PLATFORM_NAME};${CMAKE_C_COMPILER_ARCHITECTURE_ID};${CMAKE_CXX_COMPILER_ARCHITECTURE_ID};"
+    MATCHES ";(ARM64);")
+  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT armasm64)
+else()
+  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT armasm)
+endif()
+
+include(CMakeDetermineASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeTestASM_MARMASMCompiler.cmake b/Modules/CMakeTestASM_MARMASMCompiler.cmake
new file mode 100644
index 0000000..a6de04c
--- /dev/null
+++ b/Modules/CMakeTestASM_MARMASMCompiler.cmake
@@ -0,0 +1,13 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This file is used by EnableLanguage in cmGlobalGenerator to
+# determine that the selected ASM_MARMASM "compiler" (should be marmasm or marmasm64)
+# works. For assembler this can only check whether the compiler has been found,
+# because otherwise there would have to be a separate assembler source file
+# for each assembler on every architecture.
+
+set(ASM_DIALECT "_MARMASM")
+include(CMakeTestASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 94c86e9..365b72a 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -834,8 +834,8 @@
 # The NVHPC layout moves math library headers and libraries to a sibling directory.
 # Create a separate variable so this directory can be selectively added to math targets.
 if(NOT EXISTS "${CUDAToolkit_INCLUDE_DIR}/cublas_v2.h")
-  set(CUDAToolkit_MATH_INCLUDE_DIR "${CUDAToolkit_TARGET_DIR}/../../math_libs/include")
-  cmake_path(NORMAL_PATH CUDAToolkit_MATH_INCLUDE_DIR)
+  file(REAL_PATH "${CUDAToolkit_TARGET_DIR}/../../" CUDAToolkit_MATH_INCLUDE_DIR)
+  cmake_path(APPEND CUDAToolkit_MATH_INCLUDE_DIR "math_libs/include")
   if(NOT EXISTS "${CUDAToolkit_MATH_INCLUDE_DIR}/cublas_v2.h")
     if(NOT CUDAToolkit_FIND_QUIETLY)
       message(STATUS "Unable to find cublas_v2.h in either \"${CUDAToolkit_INCLUDE_DIR}\" or \"${CUDAToolkit_MATH_INCLUDE_DIR}\"")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5e7896f..c215707 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 25)
-set(CMake_VERSION_PATCH 20221108)
+set(CMake_VERSION_PATCH 20221110)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index a41b237..c90b7ee 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -254,12 +254,17 @@
   CMakeGUIMainLib
   PUBLIC
     CMakeGUILib
-    CMakeGUIQRCLib
-    $<TARGET_NAME_IF_EXISTS:CMakeVersion>
   )
 
 add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx)
-target_link_libraries(cmake-gui CMakeGUIMainLib ManifestLib Qt${INSTALLED_QT_VERSION}::Core)
+target_link_libraries(cmake-gui
+  PRIVATE
+    CMakeGUIMainLib
+    CMakeGUIQRCLib
+    $<TARGET_NAME_IF_EXISTS:CMakeVersion>
+    ManifestLib
+    Qt${INSTALLED_QT_VERSION}::Core
+  )
 
 if(WIN32)
   target_sources(CMakeGUIMainLib INTERFACE CMakeSetup.rc)
diff --git a/Source/cmFileAPI.cxx b/Source/cmFileAPI.cxx
index 7f8374d..3fc2179 100644
--- a/Source/cmFileAPI.cxx
+++ b/Source/cmFileAPI.cxx
@@ -687,7 +687,7 @@
 // The "codemodel" object kind.
 
 // Update Help/manual/cmake-file-api.7.rst when updating this constant.
-static unsigned int const CodeModelV2Minor = 4;
+static unsigned int const CodeModelV2Minor = 5;
 
 void cmFileAPI::BuildClientRequestCodeModel(
   ClientRequest& r, std::vector<RequestVersion> const& versions)
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index 0581802..56221a5 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -17,6 +17,7 @@
 
 #include <cm/string_view>
 #include <cmext/algorithm>
+#include <cmext/string_view>
 
 #include <cm3p/json/value.h>
 
@@ -44,6 +45,7 @@
 #include "cmListFileCache.h"
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
+#include "cmMessageType.h"
 #include "cmSourceFile.h"
 #include "cmSourceGroup.h"
 #include "cmState.h"
@@ -434,6 +436,8 @@
   std::unordered_map<CompileData, Json::ArrayIndex> CompileGroupMap;
   std::vector<CompileGroup> CompileGroups;
 
+  using FileSetDatabase = std::map<std::string, Json::ArrayIndex>;
+
   template <typename T>
   JBT<T> ToJBT(BT<T> const& bt)
   {
@@ -466,9 +470,12 @@
   Json::Value DumpPrecompileHeader(JBT<std::string> const& header);
   Json::Value DumpLanguageStandard(JBTs<std::string> const& standard);
   Json::Value DumpDefine(JBT<std::string> const& def);
-  Json::Value DumpSources();
+  std::pair<Json::Value, FileSetDatabase> DumpFileSets();
+  Json::Value DumpFileSet(cmFileSet const* fs,
+                          std::vector<std::string> const& directories);
+  Json::Value DumpSources(FileSetDatabase const& fsdb);
   Json::Value DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
-                         Json::ArrayIndex si);
+                         Json::ArrayIndex si, FileSetDatabase const& fsdb);
   Json::Value DumpSourceGroups();
   Json::Value DumpSourceGroup(SourceGroup& sg);
   Json::Value DumpCompileGroups();
@@ -1216,7 +1223,13 @@
   {
     this->ProcessLanguages();
 
-    target["sources"] = this->DumpSources();
+    auto fileSetInfo = this->DumpFileSets();
+
+    if (!fileSetInfo.first.isNull()) {
+      target["fileSets"] = fileSetInfo.first;
+    }
+
+    target["sources"] = this->DumpSources(fileSetInfo.second);
 
     Json::Value folder = this->DumpFolder();
     if (!folder.isNull()) {
@@ -1527,29 +1540,113 @@
   return paths;
 }
 
-Json::Value Target::DumpSources()
+std::pair<Json::Value, Target::FileSetDatabase> Target::DumpFileSets()
+{
+  Json::Value fsJson = Json::nullValue;
+  FileSetDatabase fsdb;
+
+  // Build the fileset database.
+  auto const* tgt = this->GT->Target;
+  auto const& fs_names = tgt->GetAllFileSetNames();
+
+  if (!fs_names.empty()) {
+    fsJson = Json::arrayValue;
+    size_t fsIndex = 0;
+    for (auto const& fs_name : fs_names) {
+      auto const* fs = tgt->GetFileSet(fs_name);
+      if (!fs) {
+        this->GT->Makefile->IssueMessage(
+          MessageType::INTERNAL_ERROR,
+          cmStrCat("Target \"", tgt->GetName(),
+                   "\" is tracked to have file set \"", fs_name,
+                   "\", but it was not found."));
+        continue;
+      }
+
+      auto fileEntries = fs->CompileFileEntries();
+      auto directoryEntries = fs->CompileDirectoryEntries();
+
+      auto directories = fs->EvaluateDirectoryEntries(
+        directoryEntries, this->GT->LocalGenerator, this->Config, this->GT);
+
+      fsJson.append(this->DumpFileSet(fs, directories));
+
+      std::map<std::string, std::vector<std::string>> files_per_dirs;
+      for (auto const& entry : fileEntries) {
+        fs->EvaluateFileEntry(directories, files_per_dirs, entry,
+                              this->GT->LocalGenerator, this->Config,
+                              this->GT);
+      }
+
+      for (auto const& files_per_dir : files_per_dirs) {
+        auto const& dir = files_per_dir.first;
+        for (auto const& file : files_per_dir.second) {
+          std::string sf_path;
+          if (dir.empty()) {
+            sf_path = file;
+          } else {
+            sf_path = cmStrCat(dir, '/', file);
+          }
+          fsdb[sf_path] = static_cast<Json::ArrayIndex>(fsIndex);
+        }
+      }
+
+      ++fsIndex;
+    }
+  }
+
+  return std::make_pair(fsJson, fsdb);
+}
+
+Json::Value Target::DumpFileSet(cmFileSet const* fs,
+                                std::vector<std::string> const& directories)
+{
+  Json::Value fileSet = Json::objectValue;
+
+  fileSet["name"] = fs->GetName();
+  fileSet["type"] = fs->GetType();
+  fileSet["visibility"] =
+    std::string(cmFileSetVisibilityToName(fs->GetVisibility()));
+
+  Json::Value baseDirs = Json::arrayValue;
+  for (auto const& directory : directories) {
+    baseDirs.append(directory);
+  }
+  fileSet["baseDirectories"] = baseDirs;
+
+  return fileSet;
+}
+
+Json::Value Target::DumpSources(FileSetDatabase const& fsdb)
 {
   Json::Value sources = Json::arrayValue;
   cmGeneratorTarget::KindedSources const& kinded =
     this->GT->GetKindedSources(this->Config);
   for (cmGeneratorTarget::SourceAndKind const& sk : kinded.Sources) {
-    sources.append(this->DumpSource(sk, sources.size()));
+    sources.append(this->DumpSource(sk, sources.size(), fsdb));
   }
   return sources;
 }
 
 Json::Value Target::DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
-                               Json::ArrayIndex si)
+                               Json::ArrayIndex si,
+                               FileSetDatabase const& fsdb)
 {
   Json::Value source = Json::objectValue;
 
-  std::string const path = sk.Source.Value->ResolveFullPath();
+  cmSourceFile* sf = sk.Source.Value;
+  std::string const path = sf->ResolveFullPath();
   source["path"] = RelativeIfUnder(this->TopSource, path);
   if (sk.Source.Value->GetIsGenerated()) {
     source["isGenerated"] = true;
   }
   this->AddBacktrace(source, sk.Source.Backtrace);
 
+  auto fsit = fsdb.find(path);
+  if (fsit != fsdb.end()) {
+    source["fileSetIndex"] = fsit->second;
+  }
+
   if (cmSourceGroup* sg =
         this->GT->Makefile->FindSourceGroup(path, this->SourceGroupsLocal)) {
     source["sourceGroupIndex"] = this->AddSourceGroup(sg, si);
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a539d33..a9485b5 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -827,7 +827,8 @@
         "No " << compilerName << " could be found.\n"
         ;
       /* clang-format on */
-    } else if ((lang != "RC") && (lang != "ASM_MASM")) {
+    } else if ((lang != "RC") && (lang != "ASM_MARMASM") &&
+               (lang != "ASM_MASM")) {
       if (!cmSystemTools::FileIsFullPath(*compilerFile)) {
         /* clang-format off */
         noCompiler <<
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index bea2ae7..d6d808d 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -56,6 +56,7 @@
 {
   this->DefaultCudaFlagTableName = "v10";
   this->DefaultCudaHostFlagTableName = "v10";
+  this->DefaultMarmasmFlagTableName = "v10";
   this->DefaultNasmFlagTableName = "v10";
 }
 
@@ -1466,6 +1467,13 @@
                        "CudaHost");
 }
 
+cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMarmasmFlagTable()
+  const
+{
+  return LoadFlagTable(std::string(), this->DefaultMarmasmFlagTableName,
+                       "MARMASM");
+}
+
 cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetMasmFlagTable() const
 {
   return LoadFlagTable(this->GetMasmFlagTableName(),
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index b32c0a7..b3d9552 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -163,6 +163,7 @@
   cmIDEFlagTable const* GetLinkFlagTable() const;
   cmIDEFlagTable const* GetCudaFlagTable() const;
   cmIDEFlagTable const* GetCudaHostFlagTable() const;
+  cmIDEFlagTable const* GetMarmasmFlagTable() const;
   cmIDEFlagTable const* GetMasmFlagTable() const;
   cmIDEFlagTable const* GetNasmFlagTable() const;
 
@@ -226,6 +227,7 @@
   std::string DefaultLinkFlagTableName;
   std::string DefaultCudaFlagTableName;
   std::string DefaultCudaHostFlagTableName;
+  std::string DefaultMarmasmFlagTableName;
   std::string DefaultMasmFlagTableName;
   std::string DefaultNasmFlagTableName;
   std::string DefaultRCFlagTableName;
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 086d3af..c53ddf5 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -161,6 +161,18 @@
   return false;
 }
 
+void cmGlobalVisualStudio11Generator::EnableLanguage(
+  std::vector<std::string> const& lang, cmMakefile* mf, bool optional)
+{
+  for (std::string const& it : lang) {
+    if (it == "ASM_MARMASM") {
+      this->MarmasmEnabled = true;
+    }
+  }
+  this->AddPlatformDefinitions(mf);
+  cmGlobalVisualStudio10Generator::EnableLanguage(lang, mf, optional);
+}
+
 bool cmGlobalVisualStudio11Generator::InitializeWindowsPhone(cmMakefile* mf)
 {
   if (!this->SelectWindowsPhoneToolset(this->DefaultPlatformToolset)) {
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
index 2f8a7f6..fd25984 100644
--- a/Source/cmGlobalVisualStudio11Generator.h
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -25,6 +25,9 @@
 
   bool MatchesGeneratorName(const std::string& name) const override;
 
+  void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
+                      bool optional) override;
+
   bool SupportsCustomCommandDepfile() const override { return true; }
 
   cm::optional<cmDepfileFormat> DepfileFormat() const override
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index ff76762..7431176 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -70,6 +70,7 @@
   : cmGlobalVisualStudioGenerator(cm, platformInGeneratorName)
 {
   this->DevEnvCommandInitialized = false;
+  this->MarmasmEnabled = false;
   this->MasmEnabled = false;
   this->NasmEnabled = false;
   this->ExtraFlagTable = cmVS7ExtraFlagTable;
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 288069c..e901ecd 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -106,6 +106,7 @@
   bool FindMakeProgram(cmMakefile* mf) override;
 
   /** Is the Microsoft Assembler enabled?  */
+  bool IsMarmasmEnabled() const { return this->MarmasmEnabled; }
   bool IsMasmEnabled() const { return this->MasmEnabled; }
   bool IsNasmEnabled() const { return this->NasmEnabled; }
 
@@ -176,6 +177,7 @@
   // Set during OutputSLNFile with the name of the current project.
   // There is one SLN file per project.
   std::string CurrentProject;
+  bool MarmasmEnabled;
   bool MasmEnabled;
   bool NasmEnabled;
 
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index af2d31d..383045d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -842,6 +842,24 @@
     }
   }
   fout << "/>\n"; // end of <Tool Name=VCCLCompilerTool
+  if (gg->IsMarmasmEnabled() && !this->FortranProject) {
+    Options marmasmOptions(this, Options::MarmasmCompiler, 0, 0);
+    /* clang-format off */
+    fout <<
+      "\t\t\t<Tool\n"
+      "\t\t\t\tName=\"MARMASM\"\n"
+      ;
+    /* clang-format on */
+    targetOptions.OutputAdditionalIncludeDirectories(fout, 4, "ASM_MARMASM");
+    // Use same preprocessor definitions as VCCLCompilerTool.
+    targetOptions.OutputPreprocessorDefinitions(fout, 4, "ASM_MARMASM");
+    marmasmOptions.OutputFlagMap(fout, 4);
+    /* clang-format off */
+    fout <<
+      "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"
+      "\t\t\t/>\n";
+    /* clang-format on */
+  }
   if (gg->IsMasmEnabled() && !this->FortranProject) {
     Options masmOptions(this, Options::MasmCompiler, 0, 0);
     /* clang-format off */
@@ -1720,6 +1738,10 @@
             aCompilerTool = "VFCustomBuildTool";
           }
         }
+        if (gg->IsMarmasmEnabled() && !this->FortranProject &&
+            lang == "ASM_MARMASM") {
+          aCompilerTool = "MARMASM";
+        }
         if (gg->IsMasmEnabled() && !this->FortranProject &&
             lang == "ASM_MASM") {
           aCompilerTool = "MASM";
@@ -2050,6 +2072,17 @@
        << "\t\t<Platform\n\t\t\tName=\"" << gg->GetPlatformName() << "\"/>\n"
        << "\t</Platforms>\n";
   /* clang-format on */
+  if (gg->IsMarmasmEnabled()) {
+    /* clang-format off */
+    fout <<
+      "\t<ToolFiles>\n"
+      "\t\t<DefaultToolFile\n"
+      "\t\t\tFileName=\"marmasm.rules\"\n"
+      "\t\t/>\n"
+      "\t</ToolFiles>\n"
+      ;
+    /* clang-format on */
+  }
   if (gg->IsMasmEnabled()) {
     /* clang-format off */
     fout <<
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index c982713..9393389 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -406,6 +406,9 @@
     if (!this->ComputeCudaLinkOptions()) {
       return;
     }
+    if (!this->ComputeMarmasmOptions()) {
+      return;
+    }
     if (!this->ComputeMasmOptions()) {
       return;
     }
@@ -732,6 +735,11 @@
                        this->GlobalGenerator->GetPlatformToolsetCuda() +
                        ".props");
       }
+      if (this->GlobalGenerator->IsMarmasmEnabled()) {
+        Elem(e1, "Import")
+          .Attribute("Project",
+                     "$(VCTargetsPath)\\BuildCustomizations\\marmasm.props");
+      }
       if (this->GlobalGenerator->IsMasmEnabled()) {
         Elem(e1, "Import")
           .Attribute("Project",
@@ -830,6 +838,11 @@
                        this->GlobalGenerator->GetPlatformToolsetCuda() +
                        ".targets");
       }
+      if (this->GlobalGenerator->IsMarmasmEnabled()) {
+        Elem(e1, "Import")
+          .Attribute("Project",
+                     "$(VCTargetsPath)\\BuildCustomizations\\marmasm.targets");
+      }
       if (this->GlobalGenerator->IsMasmEnabled()) {
         Elem(e1, "Import")
           .Attribute("Project",
@@ -2485,6 +2498,9 @@
         const std::string& lang = si.Source->GetLanguage();
         if (lang == "C" || lang == "CXX") {
           tool = "ClCompile";
+        } else if (lang == "ASM_MARMASM" &&
+                   this->GlobalGenerator->IsMarmasmEnabled()) {
+          tool = "MARMASM";
         } else if (lang == "ASM_MASM" &&
                    this->GlobalGenerator->IsMasmEnabled()) {
           tool = "MASM";
@@ -2740,6 +2756,9 @@
       const std::string& srclang = source->GetLanguage();
       if (srclang == "C" || srclang == "CXX") {
         flagtable = gg->GetClFlagTable();
+      } else if (srclang == "ASM_MARMASM" &&
+                 this->GlobalGenerator->IsMarmasmEnabled()) {
+        flagtable = gg->GetMarmasmFlagTable();
       } else if (srclang == "ASM_MASM" &&
                  this->GlobalGenerator->IsMasmEnabled()) {
         flagtable = gg->GetMasmFlagTable();
@@ -3751,6 +3770,59 @@
   cudaLinkOptions.OutputFlagMap();
 }
 
+bool cmVisualStudio10TargetGenerator::ComputeMarmasmOptions()
+{
+  if (!this->GlobalGenerator->IsMarmasmEnabled()) {
+    return true;
+  }
+  for (std::string const& c : this->Configurations) {
+    if (!this->ComputeMarmasmOptions(c)) {
+      return false;
+    }
+  }
+  return true;
+}
+
+bool cmVisualStudio10TargetGenerator::ComputeMarmasmOptions(
+  std::string const& configName)
+{
+  cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator;
+  auto pOptions = cm::make_unique<Options>(
+    this->LocalGenerator, Options::MarmasmCompiler, gg->GetMarmasmFlagTable());
+  Options& marmasmOptions = *pOptions;
+
+  std::string flags;
+  this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
+                                         cmBuildStep::Compile, "ASM_MARMASM",
+                                         configName);
+
+  marmasmOptions.Parse(flags);
+
+  // Get includes for this target
+  marmasmOptions.AddIncludes(this->GetIncludes(configName, "ASM_MARMASM"));
+
+  this->MarmasmOptions[configName] = std::move(pOptions);
+  return true;
+}
+
+void cmVisualStudio10TargetGenerator::WriteMarmasmOptions(
+  Elem& e1, std::string const& configName)
+{
+  if (!this->MSTools || !this->GlobalGenerator->IsMarmasmEnabled()) {
+    return;
+  }
+  Elem e2(e1, "MARMASM");
+
+  // Preprocessor definitions and includes are shared with clOptions.
+  OptionsHelper clOptions(*(this->ClOptions[configName]), e2);
+  clOptions.OutputPreprocessorDefinitions("ASM_MARMASM");
+
+  OptionsHelper marmasmOptions(*(this->MarmasmOptions[configName]), e2);
+  marmasmOptions.OutputAdditionalIncludeDirectories("ASM_MARMASM");
+  marmasmOptions.PrependInheritedString("AdditionalOptions");
+  marmasmOptions.OutputFlagMap();
+}
+
 bool cmVisualStudio10TargetGenerator::ComputeMasmOptions()
 {
   if (!this->GlobalGenerator->IsMasmEnabled()) {
@@ -4451,6 +4523,7 @@
       //    output rc compile flags <ResourceCompile></ResourceCompile>
       this->WriteRCOptions(e1, c);
       this->WriteCudaOptions(e1, c);
+      this->WriteMarmasmOptions(e1, c);
       this->WriteMasmOptions(e1, c);
       this->WriteNasmOptions(e1, c);
     }
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 17dcecd..60e9736 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -132,6 +132,9 @@
   bool ComputeCudaLinkOptions(std::string const& config);
   void WriteCudaLinkOptions(Elem& e1, std::string const& config);
 
+  bool ComputeMarmasmOptions();
+  bool ComputeMarmasmOptions(std::string const& config);
+  void WriteMarmasmOptions(Elem& e1, std::string const& config);
   bool ComputeMasmOptions();
   bool ComputeMasmOptions(std::string const& config);
   void WriteMasmOptions(Elem& e1, std::string const& config);
@@ -208,6 +211,7 @@
   OptionsMap RcOptions;
   OptionsMap CudaOptions;
   OptionsMap CudaLinkOptions;
+  OptionsMap MarmasmOptions;
   OptionsMap MasmOptions;
   OptionsMap NasmOptions;
   OptionsMap LinkOptions;
diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h
index ed4ee1d..20e2d22 100644
--- a/Source/cmVisualStudioGeneratorOptions.h
+++ b/Source/cmVisualStudioGeneratorOptions.h
@@ -24,6 +24,7 @@
     Compiler,
     ResourceCompiler,
     CudaCompiler,
+    MarmasmCompiler,
     MasmCompiler,
     NasmCompiler,
     Linker,
diff --git a/Templates/MSBuild/FlagTables/v10_MARMASM.json b/Templates/MSBuild/FlagTables/v10_MARMASM.json
new file mode 100644
index 0000000..5c8de1f
--- /dev/null
+++ b/Templates/MSBuild/FlagTables/v10_MARMASM.json
@@ -0,0 +1,149 @@
+[
+  {
+    "name": "16BitThumbInstructions",
+    "switch": "16",
+    "comment": "Assemble source as 16-bit Thumb instructions.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "32BitArmInstructions",
+    "switch": "32",
+    "comment": "Assemble source as 32-bit ARM instructions.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CoffThumb2Only",
+    "switch": "coff_thumb2_only",
+    "comment": "Allow only Thumb-2 code.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:prompt",
+    "comment": "Prompt to send report immediately (/errorReport:prompt)",
+    "value": "0",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:queue",
+    "comment": "Prompt to send report at the next logon (/errorReport:queue)",
+    "value": "1",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:send",
+    "comment": "Automatically send report (/errorReport:send)",
+    "value": "2",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:none",
+    "comment": "Do not send report (/errorReport:none)",
+    "value": "3",
+    "flags": []
+  },
+  {
+    "name": "Errors",
+    "switch": "errors",
+    "comment": "Redirect error and warning messages.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "FunctionOverride",
+    "switch": "funcOverride",
+    "comment": "Emit function overriding support for the specified function.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "DebugInformation",
+    "switch": "g",
+    "comment": "Generate debugging information.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "Machine",
+    "switch": "machine",
+    "comment": "Specify the machine type to set in the PE header.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "NoEsc",
+    "switch": "noesc",
+    "comment": "Ignore C-style escaped special characters.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "NoLogo",
+    "switch": "nologo",
+    "comment": "Suppress the copyright banner.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "NoWarn",
+    "switch": "nowarn",
+    "comment": "Disable all warning messages.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ObjectFile",
+    "switch": "o",
+    "comment": "Specify the name of the object (output) file.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ItBlocks",
+    "switch": "oldit",
+    "comment": "Generate ARMv7-style IT blocks.",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "PredefineDirective",
+    "switch": "predefine",
+    "comment": "Specify a SETA, SETL, or SETS directive to predefine a symbol.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "SourceLink",
+    "switch": "sourcelink",
+    "comment": "Specify the configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "CommandLineArgumentsViaFile",
+    "switch": "via",
+    "comment": "Read extra command-line arguments from the specified file.",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  }
+]
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 112455b..d4ef7ee 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2161,10 +2161,16 @@
     list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC")
   endif()
 
+  if(MSVC AND NOT MSVC_VERSION LESS 1700
+     AND (CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
+      )
+    ADD_TEST_MACRO(VSMARMASM VSMARMASM)
+  endif()
+
   if(MSVC AND NOT MSVC_VERSION LESS 1310
      AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 "
           OR CMAKE_SIZEOF_VOID_P EQUAL 4)
-     AND (NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
+     AND (NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
       )
     ADD_TEST_MACRO(VSMASM VSMASM)
   endif()
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index fe57d56..024c647 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -7,7 +7,7 @@
 add_library(autoexport SHARED hello.cxx world.cxx foo.c $<TARGET_OBJECTS:objlib>)
 add_library(autoexport3 SHARED cppCLI.cxx)
 if(MSVC AND NOT MSVC_VERSION VERSION_LESS 1600
-  AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
+   AND NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
   set_property(TARGET autoexport3 PROPERTY COMMON_LANGUAGE_RUNTIME "")
 endif()
 
@@ -17,7 +17,7 @@
   add_library(autoexport_for_exec SHARED hello2.c)
   target_link_libraries(autoexport_for_exec say)
   if(NOT MSVC_VERSION VERSION_LESS 1600 AND
-    NOT CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
+     NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
     enable_language(ASM_MASM)
     target_sources(autoexport PRIVATE nop.asm)
     set_property(SOURCE nop.asm PROPERTY COMPILE_FLAGS /safeseh)
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index 1452c9b..969d8be 100644
--- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -1 +1 @@
-^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":4}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":5}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index b7623de..fda18b5 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -12,7 +12,7 @@
 def check_objects(o, g):
     assert is_list(o)
     assert len(o) == 1
-    check_index_object(o[0], "codemodel", 2, 4, check_object_codemodel(g))
+    check_index_object(o[0], "codemodel", 2, 5, check_object_codemodel(g))
 
 def check_backtrace(t, b, backtrace):
     btg = t["backtraceGraph"]
@@ -291,10 +291,30 @@
         assert matches(obj["paths"]["build"], expected["build"])
         assert matches(obj["paths"]["source"], expected["source"])
 
+        def check_file_set(actual, expected):
+            assert is_dict(actual)
+            expected_keys = ["name", "type", "visibility", "baseDirectories"]
+
+            assert is_string(actual["name"], expected["name"])
+            assert is_string(actual["type"], expected["type"])
+            assert is_string(actual["visibility"], expected["visibility"])
+
+            check_list_match(lambda a, e: matches(a, e), actual["baseDirectories"],
+                             expected["baseDirectories"],
+                             check_exception=lambda a, e: "File set base directory (check): %s" % a,
+                             missing_exception=lambda e: "File set base directory (missing): %s" % e,
+                             extra_exception=lambda a: "File set base directory (extra): %s" % a)
+
+            assert sorted(actual.keys()) == sorted(expected_keys)
+
         def check_source(actual, expected):
             assert is_dict(actual)
             expected_keys = ["path"]
 
+            if expected["fileSetName"] is not None:
+                expected_keys.append("fileSetIndex")
+                assert is_string(obj["fileSets"][actual["fileSetIndex"]]["name"], expected["fileSetName"])
+
             if expected["compileGroupLanguage"] is not None:
                 expected_keys.append("compileGroupIndex")
                 assert is_string(obj["compileGroups"][actual["compileGroupIndex"]]["language"], expected["compileGroupLanguage"])
@@ -313,6 +333,14 @@
 
             assert sorted(actual.keys()) == sorted(expected_keys)
 
+        if expected["fileSets"] is not None:
+            expected_keys.append("fileSets")
+            check_list_match(lambda a, e: matches(a["name"], e["name"]), obj["fileSets"],
+                             expected["fileSets"], check=check_file_set,
+                             check_exception=lambda a, e: "File set: %s" % a["name"],
+                             missing_exception=lambda e: "File set: %s" % e["name"],
+                             extra_exception=lambda a: "File set: %s" % a["name"])
+
         check_list_match(lambda a, e: matches(a["path"], e["path"]), obj["sources"],
                          expected["sources"], check=check_source,
                          check_exception=lambda a, e: "Source file: %s" % a["path"],
@@ -824,6 +852,7 @@
                         {
                             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/([0-9a-f]+/)?generate\\.stamp\\.rule$",
                             "isGenerated": True,
+                            "fileSetName": None,
                             "sourceGroupName": "CMake Rules",
                             "compileGroupLanguage": None,
                             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json
index eabf739..63493c9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json
@@ -5,10 +5,12 @@
     "projectName": "Alias",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json
index a5ff686..411057c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json
@@ -5,10 +5,12 @@
     "projectName": "Custom",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
index 1f443b1..bf36bfe 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json
index 017335c..ebda414 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json
@@ -5,10 +5,12 @@
     "projectName": "External",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json
index 2de5b15..579a103 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
index fa2a6e5..ec03531 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
@@ -5,10 +5,12 @@
     "projectName": "Interface",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json
index 9d8899a..f145896 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
index 0d45d07..46495ac 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
index ac7c94d..a27d328 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Alias",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
index 7af74c4..7cfc0f2 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
index c189623..715514d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
@@ -5,10 +5,37 @@
   "projectName": "codemodel-v2",
   "type": "STATIC_LIBRARY",
   "isGeneratorProvided": null,
+  "fileSets": [
+    {
+      "name": "HEADERS",
+      "type": "HEADERS",
+      "visibility": "PUBLIC",
+      "baseDirectories": [".*/Tests/RunCMake/FileAPI/fileset$"]
+    },
+    {
+      "name": "a",
+      "type": "HEADERS",
+      "visibility": "PRIVATE",
+      "baseDirectories": [".*/Tests/RunCMake/FileAPI/fileset$"]
+    },
+    {
+      "name": "b",
+      "type": "HEADERS",
+      "visibility": "PUBLIC",
+      "baseDirectories": [".*/Tests/RunCMake/FileAPI/fileset/dir$"]
+    },
+    {
+      "name": "c",
+      "type": "HEADERS",
+      "visibility": "INTERFACE",
+      "baseDirectories": [".*/Tests/RunCMake/FileAPI/fileset$"]
+    }
+  ],
   "sources": [
     {
       "path": "^fileset/empty\\.c$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "C",
       "backtrace": [
@@ -29,6 +56,7 @@
     {
       "path": "^fileset/error\\.c$",
       "isGenerated": null,
+      "fileSetName": "HEADERS",
       "sourceGroupName": "Header Files",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -49,6 +77,7 @@
     {
       "path": "^fileset/other\\.c$",
       "isGenerated": null,
+      "fileSetName": "HEADERS",
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -69,6 +98,7 @@
     {
       "path": "^fileset/h1\\.h$",
       "isGenerated": null,
+      "fileSetName": "a",
       "sourceGroupName": "Header Files",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -89,6 +119,7 @@
     {
       "path": "^fileset/dir/h2\\.h$",
       "isGenerated": null,
+      "fileSetName": "b",
       "sourceGroupName": "Header Files",
       "compileGroupLanguage": null,
       "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
index 75fe58c..4757a9c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
@@ -5,10 +5,19 @@
   "projectName": "codemodel-v2",
   "type": "STATIC_LIBRARY",
   "isGeneratorProvided": null,
+  "fileSets": [
+    {
+      "name": "HEADERS",
+      "type": "HEADERS",
+      "visibility": "INTERFACE",
+      "baseDirectories": [".*/Tests/RunCMake/FileAPI/fileset$"]
+    }
+  ],
   "sources": [
     {
       "path": "^fileset/empty\\.c$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "C",
       "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
index 0ca1962..2bfc63f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "STATIC_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
index 3392404..6342191 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
@@ -29,6 +31,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/c_object_lib\\.build)/.*/empty(\\.c)?\\.o(bj)?$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "Object Libraries",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
index 1917f92..3e1b03b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "OBJECT_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
index 0d4018a..f7a8db4 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
index 9a210ff..9066053 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "SHARED_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
index 5542277..46c5bfe 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
index 4b63897..df28479 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "STATIC_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
index 12ec917..4fa62e3 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "STATIC_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^subdir/empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
index ab301e9..8d52ab8 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Custom",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json
index 483ae79..23f8e52 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json
@@ -5,10 +5,12 @@
     "projectName": "Custom",
     "type": "UTILITY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/custom_tgt(-(Debug|Release|RelWithDebInfo|MinSizeRel))?$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -29,6 +31,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(custom/)?CMakeFiles/([0-9a-f]+/)?custom_tgt(-\\(CONFIG\\))?\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
index 837f252..b27fc5b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Alias",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
index 16d074a..12b2551 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
index 5a0f770..3251777 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
@@ -97,6 +97,7 @@
     {
       "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -111,6 +112,7 @@
     {
       "path": "^empty\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -131,6 +133,7 @@
     {
       "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
index 9455748..0ac40c2 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
@@ -143,6 +143,7 @@
     {
       "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -157,6 +158,7 @@
     {
       "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -171,6 +173,7 @@
     {
       "path": "^empty\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -191,6 +194,7 @@
     {
       "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -205,6 +209,7 @@
     {
       "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
index 9f6ffcc..86168f1 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
@@ -97,6 +97,7 @@
     {
       "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -111,6 +112,7 @@
     {
       "path": "^empty\\.cxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Source Files",
       "compileGroupLanguage": "CXX",
       "backtrace": [
@@ -131,6 +133,7 @@
     {
       "path": ".*/Debug/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -145,6 +148,7 @@
     {
       "path": ".*/Release/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -159,6 +163,7 @@
     {
       "path": ".*/MinSizeRel/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
@@ -173,6 +178,7 @@
     {
       "path": ".*/RelWithDebInfo/cmake_pch(_[^.]+)?\\.hxx$",
       "isGenerated": null,
+      "fileSetName": null,
       "sourceGroupName": "Precompile Header File",
       "compileGroupLanguage": null,
       "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
index 94ac081..f665004 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "STATIC_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
index e8d6218..68c5dcc 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
@@ -29,6 +31,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/cxx_object_lib\\.build)/.*/empty(\\.cxx)?\\.o(bj)?$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "Object Libraries",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
index 24b391b..0438a49 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "OBJECT_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
index 4421c8f..bb9989e 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
index 03f4cb9..d6d59a4 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "SHARED_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
index d6d573f..a6bacf7 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
index 9cb2832..fe884e0 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
index 52c42de..d904bd9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
index 98298be..bced68a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "STATIC_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.cxx$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
index d41bbb2..4b69682 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
@@ -5,10 +5,12 @@
     "projectName": "External",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
@@ -29,6 +31,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "Generated Source Files",
             "compileGroupLanguage": "CXX",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
index 97d7ccd..bd698d5 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
@@ -5,10 +5,12 @@
     "projectName": "Interface",
     "type": "INTERFACE_LIBRARY",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
index fe0524c..c0c3e79 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
index 451e8d4..45fb0a5 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
index cbd4346..74c179c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
index d92a810..6771747 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
index 1197a73..659e3fb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
index 42564e0..7bdaffb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "EXECUTABLE",
     "isGeneratorProvided": null,
+    "fileSets": null,
     "sources": [
         {
             "path": "^empty\\.c$",
             "isGenerated": null,
+            "fileSetName": null,
             "sourceGroupName": "Source Files",
             "compileGroupLanguage": "C",
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json
index 941c172..7462f7f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json
@@ -5,10 +5,12 @@
     "projectName": "Alias",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json
index 98c6dd9..abc5084 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json
@@ -5,10 +5,12 @@
     "projectName": "Custom",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json
index b72ff82..af4248c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json
@@ -5,10 +5,12 @@
     "projectName": "Cxx",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json
index 9e73806..a7b8bb0 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json
@@ -5,10 +5,12 @@
     "projectName": "External",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json
index 7534c84..ed3da5f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json
@@ -5,10 +5,12 @@
     "projectName": "Imported",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
index fdd4b2a..178f9ef 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
@@ -5,10 +5,12 @@
     "projectName": "Interface",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json
index bcd7616..341647b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json
@@ -5,10 +5,12 @@
     "projectName": "Object",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json
index b3030bd..b3827ed 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json
@@ -5,10 +5,12 @@
     "projectName": "codemodel-v2",
     "type": "UTILITY",
     "isGeneratorProvided": true,
+    "fileSets": null,
     "sources": [
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "",
             "compileGroupLanguage": null,
             "backtrace": [
@@ -23,6 +25,7 @@
         {
             "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK\\.rule$",
             "isGenerated": true,
+            "fileSetName": null,
             "sourceGroupName": "CMake Rules",
             "compileGroupLanguage": null,
             "backtrace": [
diff --git a/Tests/VSMARMASM/CMakeLists.txt b/Tests/VSMARMASM/CMakeLists.txt
new file mode 100644
index 0000000..eb1bfdb
--- /dev/null
+++ b/Tests/VSMARMASM/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(VSMARMASM C ASM_MARMASM)
+add_executable(VSMARMASM main.c foo.asm)
diff --git a/Tests/VSMARMASM/foo.asm b/Tests/VSMARMASM/foo.asm
new file mode 100644
index 0000000..e5b2775
--- /dev/null
+++ b/Tests/VSMARMASM/foo.asm
@@ -0,0 +1,10 @@
+    AREA |.text|, CODE
+
+    EXPORT foo
+
+foo PROC
+    mov w0, #0
+    ret
+    ENDP
+
+    END
diff --git a/Tests/VSMARMASM/main.c b/Tests/VSMARMASM/main.c
new file mode 100644
index 0000000..18ddb78
--- /dev/null
+++ b/Tests/VSMARMASM/main.c
@@ -0,0 +1,5 @@
+extern int foo(void);
+int main(void)
+{
+  return foo();
+}
diff --git a/Utilities/Sphinx/static/cmake.css b/Utilities/Sphinx/static/cmake.css
index 4539cf9..324cd92 100644
--- a/Utilities/Sphinx/static/cmake.css
+++ b/Utilities/Sphinx/static/cmake.css
@@ -34,3 +34,14 @@
   text-align: center;
   width: 100%;
 }
+
+/* Revert style to the inherited (normal text) for `:guide:` links */
+code.xref.cmake-guide {
+  font-size: inherit;
+  font-family: inherit;
+  font-weight: inherit;
+  padding: inherit;
+}
+code.xref.cmake-guide span.pre {
+  white-space: inherit;
+}
diff --git a/Utilities/cmcurl/lib/vtls/schannel.c b/Utilities/cmcurl/lib/vtls/schannel.c
index 454eb79..e022a2c 100644
--- a/Utilities/cmcurl/lib/vtls/schannel.c
+++ b/Utilities/cmcurl/lib/vtls/schannel.c
@@ -220,6 +220,7 @@
   case CURL_SSLVERSION_MAX_NONE:
   case CURL_SSLVERSION_MAX_DEFAULT:
 
+#if 0 /* Disabled in CMake due to issue 24147 (curl issue 9431) */
     /* Windows Server 2022 and newer (including Windows 11) support TLS 1.3
        built-in. Previous builds of Windows 10 had broken TLS 1.3
        implementations that could be enabled via registry.
@@ -229,6 +230,7 @@
       ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3;
     }
     else /* Windows 10 and older */
+#endif
       ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2;
 
     break;
@@ -247,6 +249,7 @@
       break;
     case CURL_SSLVERSION_TLSv1_3:
 
+#if 0 /* Disabled in CMake due to issue 24147 (curl issue 9431) */
       /* Windows Server 2022 and newer */
       if(curlx_verify_windows_version(10, 0, 20348, PLATFORM_WINNT,
                                       VERSION_GREATER_THAN_EQUAL)) {
@@ -257,6 +260,10 @@
         failf(data, "schannel: TLS 1.3 not supported on Windows prior to 11");
         return CURLE_SSL_CONNECT_ERROR;
       }
+#else
+      failf(data, "schannel: TLS 1.3 is not yet supported");
+      return CURLE_SSL_CONNECT_ERROR;
+#endif
     }
   }
   return CURLE_OK;