Browse Source

cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesets

There's no backing implementation for header units anyways, so just
remove it for now.
Ben Boeckel 2 years ago
parent
commit
6ff5cdc533
36 changed files with 31 additions and 364 deletions
  1. 6 26
      Help/command/target_sources.rst
  2. 0 6
      Help/manual/cmake-properties.7.rst
  3. 1 2
      Help/prop_sf/CXX_SCAN_FOR_MODULES.rst
  4. 0 19
      Help/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS.rst
  5. 0 21
      Help/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS_NAME.rst
  6. 0 20
      Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst
  7. 0 20
      Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SETS.rst
  8. 0 21
      Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET_NAME.rst
  9. 1 1
      Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst
  10. 0 18
      Help/prop_tgt/INTERFACE_CXX_MODULE_HEADER_UNIT_SETS.rst
  11. 0 6
      Source/cmDebuggerVariablesHelper.cxx
  12. 2 4
      Source/cmExportBuildFileGenerator.cxx
  13. 2 4
      Source/cmExportInstallFileGenerator.cxx
  14. 6 19
      Source/cmGeneratorTarget.cxx
  15. 1 2
      Source/cmMakefileTargetGenerator.cxx
  16. 1 3
      Source/cmNinjaTargetGenerator.cxx
  17. 0 32
      Source/cmTarget.cxx
  18. 0 2
      Source/cmTarget.h
  19. 5 6
      Source/cmTargetSourcesCommand.cxx
  20. 1 3
      Source/cmVisualStudio10TargetGenerator.cxx
  21. 0 1
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface-result.txt
  22. 0 12
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface-stderr.txt
  23. 0 8
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface.cmake
  24. 0 6
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterfaceImported-stderr.txt
  25. 0 8
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterfaceImported.cmake
  26. 0 11
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPrivate-stderr.txt
  27. 0 13
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPrivate.cmake
  28. 0 11
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPublic-stderr.txt
  29. 0 13
      Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPublic.cmake
  30. 2 2
      Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt
  31. 0 1
      Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits-result.txt
  32. 0 22
      Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits-stderr.txt
  33. 0 15
      Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits.cmake
  34. 1 2
      Tests/RunCMake/CXXModules/RunCMakeTest.cmake
  35. 1 2
      Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-stderr.txt
  36. 1 2
      Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-stderr.txt

+ 6 - 26
Help/command/target_sources.rst

@@ -91,15 +91,6 @@ files within those directories. The acceptable types include:
   using the ``export`` keyword). This file set type may not have an
   ``INTERFACE`` scope except on ``IMPORTED`` targets.
 
-``CXX_MODULE_HEADER_UNITS``
-
-  .. note ::
-
-    Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-  C++ header sources which may be imported by other C++ source code. This file
-  set type may not have an ``INTERFACE`` scope except on ``IMPORTED`` targets.
-
 The optional default file sets are named after their type. The target may not
 be a custom target or :prop_tgt:`FRAMEWORK` target.
 
@@ -177,31 +168,20 @@ For file sets of type ``CXX_MODULES``:
 * :prop_tgt:`CXX_MODULE_DIRS`
 * :prop_tgt:`CXX_MODULE_DIRS_<NAME>`
 
-For file sets of type ``CXX_MODULE_HEADER_UNITS``:
-
-* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS`
-* :prop_tgt:`INTERFACE_CXX_MODULE_HEADER_UNIT_SETS`
-* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET`
-* :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>`
-* :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS`
-* :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS_<NAME>`
-
 Target properties related to include directories are also modified by
 ``target_sources(FILE_SET)`` as follows:
 
 :prop_tgt:`INCLUDE_DIRECTORIES`
 
-  If the ``TYPE`` is ``HEADERS`` or ``CXX_MODULE_HEADER_UNITS``, and the scope
-  of the file set is ``PRIVATE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of
-  the file set are wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this
-  property.
+  If the ``TYPE`` is ``HEADERS``, and the scope of the file set is ``PRIVATE``
+  or ``PUBLIC``, all of the ``BASE_DIRS`` of the file set are wrapped in
+  :genex:`$<BUILD_INTERFACE>` and appended to this property.
 
 :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`
 
-  If the ``TYPE`` is ``HEADERS`` or ``CXX_MODULE_HEADER_UNITS``, and the scope
-  of the file set is ``INTERFACE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of
-  the file set are wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this
-  property.
+  If the ``TYPE`` is ``HEADERS``, and the scope of the file set is
+  ``INTERFACE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of the file set are
+  wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this property.
 
 See Also
 ^^^^^^^^

+ 0 - 6
Help/manual/cmake-properties.7.rst

@@ -189,11 +189,6 @@ Properties on Targets
    /prop_tgt/CXX_EXTENSIONS
    /prop_tgt/CXX_MODULE_DIRS
    /prop_tgt/CXX_MODULE_DIRS_NAME
-   /prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS
-   /prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS_NAME
-   /prop_tgt/CXX_MODULE_HEADER_UNIT_SET
-   /prop_tgt/CXX_MODULE_HEADER_UNIT_SET_NAME
-   /prop_tgt/CXX_MODULE_HEADER_UNIT_SETS
    /prop_tgt/CXX_MODULE_SET
    /prop_tgt/CXX_MODULE_SET_NAME
    /prop_tgt/CXX_MODULE_SETS
@@ -279,7 +274,6 @@ Properties on Targets
    /prop_tgt/INTERFACE_COMPILE_DEFINITIONS
    /prop_tgt/INTERFACE_COMPILE_FEATURES
    /prop_tgt/INTERFACE_COMPILE_OPTIONS
-   /prop_tgt/INTERFACE_CXX_MODULE_HEADER_UNIT_SETS
    /prop_tgt/INTERFACE_CXX_MODULE_SETS
    /prop_tgt/INTERFACE_HEADER_SETS
    /prop_tgt/INTERFACE_HEADER_SETS_TO_VERIFY

+ 1 - 2
Help/prop_sf/CXX_SCAN_FOR_MODULES.rst

@@ -15,8 +15,7 @@ consulted.
 
 Note that scanning is only performed if C++20 or higher is enabled for the
 target and the source uses the ``CXX`` language.  Scanning for modules in
-sources belonging to file sets of type ``CXX_MODULES`` and
-``CXX_MODULES_HEADER_UNITS`` is always performed.
+sources belonging to file sets of type ``CXX_MODULES`` is always performed.
 
 .. note ::
 

+ 0 - 19
Help/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS.rst

@@ -1,19 +0,0 @@
-CXX_MODULE_HEADER_UNIT_DIRS
----------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Semicolon-separated list of base directories of the target's default C++
-module header set (i.e. the file set with name and type
-``CXX_MODULE_HEADER_UNITS``). The property supports
-:manual:`generator expressions <cmake-generator-expressions(7)>`.
-
-This property is normally only set by :command:`target_sources(FILE_SET)`
-rather than being manipulated directly.
-
-See :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS_<NAME>` for the list of base
-directories in other C++ module header sets.

+ 0 - 21
Help/prop_tgt/CXX_MODULE_HEADER_UNIT_DIRS_NAME.rst

@@ -1,21 +0,0 @@
-CXX_MODULE_HEADER_UNIT_DIRS_<NAME>
-----------------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Semicolon-separated list of base directories of the target's ``<NAME>`` C++
-module header set, which has the set type ``CXX_MODULE_HEADER_UNITS``. The
-property supports
-:manual:`generator expressions <cmake-generator-expressions(7)>`.
-
-This property is normally only set by :command:`target_sources(FILE_SET)`
-rather than being manipulated directly.
-
-See :prop_tgt:`CXX_MODULE_HEADER_UNIT_DIRS` for the list of base directories
-in the default C++ module header set. See
-:prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS` for the file set names of all C++
-module header sets.

+ 0 - 20
Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET.rst

@@ -1,20 +0,0 @@
-CXX_MODULE_HEADER_UNIT_SET
---------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Semicolon-separated list of files in the target's default C++ module header
-set, (i.e. the file set with name and type ``CXX_MODULE_HEADER_UNITS``). If
-any of the paths are relative, they are computed relative to the target's
-source directory. The property supports
-:manual:`generator expressions <cmake-generator-expressions(7)>`.
-
-This property is normally only set by :command:`target_sources(FILE_SET)`
-rather than being manipulated directly.
-
-See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>` for the list of files in
-other C++ module header sets.

+ 0 - 20
Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SETS.rst

@@ -1,20 +0,0 @@
-CXX_MODULE_HEADER_UNIT_SETS
----------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` C++ module header
-sets (i.e. all file sets with the type ``CXX_MODULE_HEADER_UNITS``). Files
-listed in these file sets are treated as source files for the purpose of IDE
-integration.
-
-C++ module header sets may be defined using the :command:`target_sources`
-command ``FILE_SET`` option with type ``CXX_MODULE_HEADER_UNITS``.
-
-See also :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET_<NAME>`,
-:prop_tgt:`CXX_MODULE_HEADER_UNIT_SET` and
-:prop_tgt:`INTERFACE_CXX_MODULE_HEADER_UNIT_SETS`.

+ 0 - 21
Help/prop_tgt/CXX_MODULE_HEADER_UNIT_SET_NAME.rst

@@ -1,21 +0,0 @@
-CXX_MODULE_HEADER_UNIT_SET_<NAME>
----------------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Semicolon-separated list of files in the target's ``<NAME>`` C++ module header
-set, which has the set type ``CXX_MODULE_HEADER_UNITS``. If any of the paths
-are relative, they are computed relative to the target's source directory. The
-property supports
-:manual:`generator expressions <cmake-generator-expressions(7)>`.
-
-This property is normally only set by :command:`target_sources(FILE_SET)`
-rather than being manipulated directly.
-
-See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SET` for the list of files in the
-default C++ module header set. See :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS` for
-the file set names of all C++ module header sets.

+ 1 - 1
Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst

@@ -19,7 +19,7 @@ scan the target's ``CXX`` sources at build time.
 
 Note that scanning is only performed if C++20 or higher is enabled for the
 target.  Scanning for modules in the target's sources belonging to file sets
-of type ``CXX_MODULES`` and ``CXX_MODULES_HEADER_UNITS`` is always performed.
+of type ``CXX_MODULES`` is always performed.
 
 .. note ::
 

+ 0 - 18
Help/prop_tgt/INTERFACE_CXX_MODULE_HEADER_UNIT_SETS.rst

@@ -1,18 +0,0 @@
-INTERFACE_CXX_MODULE_HEADER_UNIT_SETS
--------------------------------------
-
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
-Read-only list of the target's ``PUBLIC`` C++ module header sets (i.e. all
-file sets with the type ``CXX_MODULE_HEADER_UNITS``). Files listed in these
-C++ module header sets can be installed with :command:`install(TARGETS)` and
-exported with :command:`install(EXPORT)` and :command:`export`.
-
-C++ module header sets may be defined using the :command:`target_sources`
-command ``FILE_SET`` option with type ``CXX_MODULE_HEADER_UNITS``.
-
-See also :prop_tgt:`CXX_MODULE_HEADER_UNIT_SETS`.

+ 0 - 6
Source/cmDebuggerVariablesHelper.cxx

@@ -306,18 +306,12 @@ std::shared_ptr<cmDebuggerVariables> cmDebuggerVariablesHelper::CreateIfAny(
     targetVariables->AddSubVariables(
       CreateIfAny(variablesManager, "CompileOptions", supportsVariableType,
                   target->GetCompileOptionsEntries()));
-    targetVariables->AddSubVariables(CreateIfAny(
-      variablesManager, "CxxModuleHeaderSets", supportsVariableType,
-      target->GetCxxModuleHeaderSetsEntries()));
     targetVariables->AddSubVariables(
       CreateIfAny(variablesManager, "CxxModuleSets", supportsVariableType,
                   target->GetCxxModuleSetsEntries()));
     targetVariables->AddSubVariables(
       CreateIfAny(variablesManager, "HeaderSets", supportsVariableType,
                   target->GetHeaderSetsEntries()));
-    targetVariables->AddSubVariables(CreateIfAny(
-      variablesManager, "InterfaceCxxModuleHeaderSets", supportsVariableType,
-      target->GetInterfaceCxxModuleHeaderSetsEntries()));
     targetVariables->AddSubVariables(CreateIfAny(
       variablesManager, "InterfaceHeaderSets", supportsVariableType,
       target->GetInterfaceHeaderSetsEntries()));

+ 2 - 4
Source/cmExportBuildFileGenerator.cxx

@@ -399,8 +399,7 @@ std::string cmExportBuildFileGenerator::GetFileSetDirectories(
     auto const& type = fileSet->GetType();
     // C++ modules do not support interface file sets which are dependent upon
     // the configuration.
-    if (contextSensitive &&
-        (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
+    if (contextSensitive && type == "CXX_MODULES"_s) {
       auto* mf = this->LG->GetMakefile();
       std::ostringstream e;
       e << "The \"" << gte->GetName() << "\" target's interface file set \""
@@ -459,8 +458,7 @@ std::string cmExportBuildFileGenerator::GetFileSetFiles(cmGeneratorTarget* gte,
     auto const& type = fileSet->GetType();
     // C++ modules do not support interface file sets which are dependent upon
     // the configuration.
-    if (contextSensitive &&
-        (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
+    if (contextSensitive && type == "CXX_MODULES"_s) {
       auto* mf = this->LG->GetMakefile();
       std::ostringstream e;
       e << "The \"" << gte->GetName() << "\" target's interface file set \""

+ 2 - 4
Source/cmExportInstallFileGenerator.cxx

@@ -598,8 +598,7 @@ std::string cmExportInstallFileGenerator::GetFileSetDirectories(
     auto const& type = fileSet->GetType();
     // C++ modules do not support interface file sets which are dependent upon
     // the configuration.
-    if (cge->GetHadContextSensitiveCondition() &&
-        (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
+    if (cge->GetHadContextSensitiveCondition() && type == "CXX_MODULES"_s) {
       auto* mf = this->IEGen->GetLocalGenerator()->GetMakefile();
       std::ostringstream e;
       e << "The \"" << gte->GetName() << "\" target's interface file set \""
@@ -661,8 +660,7 @@ std::string cmExportInstallFileGenerator::GetFileSetFiles(
     auto const& type = fileSet->GetType();
     // C++ modules do not support interface file sets which are dependent upon
     // the configuration.
-    if (contextSensitive &&
-        (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s)) {
+    if (contextSensitive && type == "CXX_MODULES"_s) {
       auto* mf = this->IEGen->GetLocalGenerator()->GetMakefile();
       std::ostringstream e;
       e << "The \"" << gte->GetName() << "\" target's interface file set \""

+ 6 - 19
Source/cmGeneratorTarget.cxx

@@ -1204,12 +1204,11 @@ bool cmGeneratorTarget::IsInBuildSystem() const
     case cmStateEnums::GLOBAL_TARGET:
       return true;
     case cmStateEnums::INTERFACE_LIBRARY:
-      // An INTERFACE library is in the build system if it has SOURCES,
-      // HEADER_SETS, or C++ module filesets.
+      // An INTERFACE library is in the build system if it has SOURCES
+      // or C++ module filesets.
       if (!this->SourceEntries.empty() ||
           !this->Target->GetHeaderSetsEntries().empty() ||
-          !this->Target->GetCxxModuleSetsEntries().empty() ||
-          !this->Target->GetCxxModuleHeaderSetsEntries().empty()) {
+          !this->Target->GetCxxModuleSetsEntries().empty()) {
         return true;
       }
       break;
@@ -1645,8 +1644,7 @@ void addFileSetEntry(cmGeneratorTarget const* headTarget,
         }
       }
       if (!found) {
-        if (fileSet->GetType() == "HEADERS"_s ||
-            fileSet->GetType() == "CXX_MODULE_HEADER_UNITS"_s) {
+        if (fileSet->GetType() == "HEADERS"_s) {
           headTarget->Makefile->GetOrCreateSourceGroup("Header Files")
             ->AddGroupFile(path);
         }
@@ -1673,14 +1671,6 @@ void AddFileSetEntries(cmGeneratorTarget const* headTarget,
       addFileSetEntry(headTarget, config, dagChecker, cxxModuleSet, entries);
     }
   }
-  for (auto const& entry :
-       headTarget->Target->GetCxxModuleHeaderSetsEntries()) {
-    for (auto const& name : cmList{ entry.Value }) {
-      auto const* cxxModuleHeaderSet = headTarget->Target->GetFileSet(name);
-      addFileSetEntry(headTarget, config, dagChecker, cxxModuleHeaderSet,
-                      entries);
-    }
-  }
 }
 
 bool processSources(cmGeneratorTarget const* tgt,
@@ -8894,8 +8884,7 @@ bool cmGeneratorTarget::HaveCxx20ModuleSources() const
                        }
 
                        auto const& fs_type = file_set->GetType();
-                       return fs_type == "CXX_MODULES"_s ||
-                         fs_type == "CXX_MODULE_HEADER_UNITS"_s;
+                       return fs_type == "CXX_MODULES"_s;
                      });
 }
 
@@ -8998,9 +8987,7 @@ bool cmGeneratorTarget::NeedDyndepForSource(std::string const& lang,
     return false;
   }
   auto const* fs = this->GetFileSetForSource(config, sf);
-  if (fs &&
-      (fs->GetType() == "CXX_MODULES"_s ||
-       fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
+  if (fs && fs->GetType() == "CXX_MODULES"_s) {
     return true;
   }
   auto const sfProp = sf->GetProperty("CXX_SCAN_FOR_MODULES");

+ 1 - 2
Source/cmMakefileTargetGenerator.cxx

@@ -367,8 +367,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
     auto const it = file_set_map.find(path);
     if (it != file_set_map.end()) {
       auto const& file_set_type = it->second;
-      if (file_set_type == "CXX_MODULES"_s ||
-          file_set_type == "CXX_MODULE_HEADER_UNITS"_s) {
+      if (file_set_type == "CXX_MODULES"_s) {
         if (sf->GetLanguage() != "CXX"_s) {
           this->Makefile->IssueMessage(
             MessageType::FATAL_ERROR,

+ 1 - 3
Source/cmNinjaTargetGenerator.cxx

@@ -239,9 +239,7 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(
   }
 
   auto const* fs = this->GeneratorTarget->GetFileSetForSource(config, source);
-  if (fs &&
-      (fs->GetType() == "CXX_MODULES"_s ||
-       fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
+  if (fs && fs->GetType() == "CXX_MODULES"_s) {
     if (source->GetLanguage() != "CXX"_s) {
       this->GetMakefile()->IssueMessage(
         MessageType::FATAL_ERROR,

+ 0 - 32
Source/cmTarget.cxx

@@ -675,7 +675,6 @@ public:
 
   FileSetType HeadersFileSets;
   FileSetType CxxModulesFileSets;
-  FileSetType CxxModuleHeadersFileSets;
 
   cmTargetInternals();
 
@@ -734,13 +733,6 @@ cmTargetInternals::cmTargetInternals()
                        "The default C++ module set"_s, "C++ module set"_s,
                        FileSetEntries("CXX_MODULE_SETS"_s),
                        FileSetEntries("INTERFACE_CXX_MODULE_SETS"_s))
-  , CxxModuleHeadersFileSets(
-      "CXX_MODULE_HEADER_UNITS"_s, "CXX_MODULE_HEADER_UNIT_DIRS"_s,
-      "CXX_MODULE_HEADER_UNIT_SET"_s, "CXX_MODULE_HEADER_UNIT_DIRS_"_s,
-      "CXX_MODULE_HEADER_UNIT_SET_"_s, "C++ module header"_s,
-      "The default C++ module header set"_s, "C++ module header set"_s,
-      FileSetEntries("CXX_MODULE_HEADER_UNIT_SETS"_s),
-      FileSetEntries("INTERFACE_CXX_MODULE_HEADER_UNIT_SETS"_s))
 {
 }
 
@@ -1751,11 +1743,6 @@ cmBTStringRange cmTarget::GetCxxModuleSetsEntries() const
   return cmMakeRange(this->impl->CxxModulesFileSets.SelfEntries.Entries);
 }
 
-cmBTStringRange cmTarget::GetCxxModuleHeaderSetsEntries() const
-{
-  return cmMakeRange(this->impl->CxxModuleHeadersFileSets.SelfEntries.Entries);
-}
-
 cmBTStringRange cmTarget::GetInterfaceHeaderSetsEntries() const
 {
   return cmMakeRange(this->impl->HeadersFileSets.InterfaceEntries.Entries);
@@ -1766,12 +1753,6 @@ cmBTStringRange cmTarget::GetInterfaceCxxModuleSetsEntries() const
   return cmMakeRange(this->impl->CxxModulesFileSets.InterfaceEntries.Entries);
 }
 
-cmBTStringRange cmTarget::GetInterfaceCxxModuleHeaderSetsEntries() const
-{
-  return cmMakeRange(
-    this->impl->CxxModuleHeadersFileSets.InterfaceEntries.Entries);
-}
-
 namespace {
 #define MAKE_PROP(PROP) const std::string prop##PROP = #PROP
 MAKE_PROP(C_STANDARD);
@@ -1875,7 +1856,6 @@ void cmTarget::SetProperty(const std::string& prop, cmValue value)
   FileSetType* fileSetTypes[] = {
     &this->impl->HeadersFileSets,
     &this->impl->CxxModulesFileSets,
-    &this->impl->CxxModuleHeadersFileSets,
   };
 
   for (auto* fileSetType : fileSetTypes) {
@@ -2049,7 +2029,6 @@ void cmTarget::AppendProperty(const std::string& prop,
   FileSetType* fileSetTypes[] = {
     &this->impl->HeadersFileSets,
     &this->impl->CxxModulesFileSets,
-    &this->impl->CxxModuleHeadersFileSets,
   };
 
   for (auto* fileSetType : fileSetTypes) {
@@ -2545,7 +2524,6 @@ cmValue cmTarget::GetProperty(const std::string& prop) const
     FileSetType* fileSetTypes[] = {
       &this->impl->HeadersFileSets,
       &this->impl->CxxModulesFileSets,
-      &this->impl->CxxModuleHeadersFileSets,
     };
 
     for (auto* fileSetType : fileSetTypes) {
@@ -2891,9 +2869,6 @@ std::pair<cmFileSet*, bool> cmTarget::GetOrCreateFileSet(
       this->impl->HeadersFileSets.AddFileSet(name, vis, std::move(bt));
     } else if (type == this->impl->CxxModulesFileSets.TypeName) {
       this->impl->CxxModulesFileSets.AddFileSet(name, vis, std::move(bt));
-    } else if (type == this->impl->CxxModuleHeadersFileSets.TypeName) {
-      this->impl->CxxModuleHeadersFileSets.AddFileSet(name, vis,
-                                                      std::move(bt));
     }
   }
   return std::make_pair(&result.first->second, result.second);
@@ -2907,9 +2882,6 @@ std::string cmTarget::GetFileSetsPropertyName(const std::string& type)
   if (type == "CXX_MODULES") {
     return "CXX_MODULE_SETS";
   }
-  if (type == "CXX_MODULE_HEADER_UNITS") {
-    return "CXX_MODULE_HEADER_UNIT_SETS";
-  }
   return "";
 }
 
@@ -2921,9 +2893,6 @@ std::string cmTarget::GetInterfaceFileSetsPropertyName(const std::string& type)
   if (type == "CXX_MODULES") {
     return "INTERFACE_CXX_MODULE_SETS";
   }
-  if (type == "CXX_MODULE_HEADER_UNITS") {
-    return "INTERFACE_CXX_MODULE_HEADER_UNIT_SETS";
-  }
   return "";
 }
 
@@ -2952,7 +2921,6 @@ std::vector<std::string> cmTarget::GetAllInterfaceFileSets() const
 
   appendEntries(this->impl->HeadersFileSets.InterfaceEntries.Entries);
   appendEntries(this->impl->CxxModulesFileSets.InterfaceEntries.Entries);
-  appendEntries(this->impl->CxxModuleHeadersFileSets.InterfaceEntries.Entries);
 
   return result;
 }

+ 0 - 2
Source/cmTarget.h

@@ -296,11 +296,9 @@ public:
 
   cmBTStringRange GetHeaderSetsEntries() const;
   cmBTStringRange GetCxxModuleSetsEntries() const;
-  cmBTStringRange GetCxxModuleHeaderSetsEntries() const;
 
   cmBTStringRange GetInterfaceHeaderSetsEntries() const;
   cmBTStringRange GetInterfaceCxxModuleSetsEntries() const;
-  cmBTStringRange GetInterfaceCxxModuleHeaderSetsEntries() const;
 
   std::string ImportedGetFullPath(const std::string& config,
                                   cmStateEnums::ArtifactType artifact) const;

+ 5 - 6
Source/cmTargetSourcesCommand.cxx

@@ -264,19 +264,18 @@ bool TargetSourcesImpl::HandleOneFileSet(
       *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
 
     if (supportCxx20FileSetTypes) {
-      if (type != "HEADERS"_s && type != "CXX_MODULES"_s &&
-          type != "CXX_MODULE_HEADER_UNITS"_s) {
+      if (type != "HEADERS"_s && type != "CXX_MODULES"_s) {
         this->SetError(
-          R"(File set TYPE may only be "HEADERS", "CXX_MODULES", or "CXX_MODULE_HEADER_UNITS")");
+          R"(File set TYPE may only be "HEADERS" or "CXX_MODULES")");
         return false;
       }
 
       if (cmFileSetVisibilityIsForInterface(visibility) &&
           !cmFileSetVisibilityIsForSelf(visibility) &&
           !this->Target->IsImported()) {
-        if (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s) {
+        if (type == "CXX_MODULES"_s) {
           this->SetError(
-            R"(File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS" may not have "INTERFACE" visibility)");
+            R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)");
           return false;
         }
       }
@@ -320,7 +319,7 @@ bool TargetSourcesImpl::HandleOneFileSet(
   if (!baseDirectories.empty()) {
     fileSet.first->AddDirectoryEntry(
       BT<std::string>(baseDirectories, this->Makefile->GetBacktrace()));
-    if (type == "HEADERS"_s || type == "CXX_MODULE_HEADER_UNITS"_s) {
+    if (type == "HEADERS"_s) {
       for (auto const& dir : cmList{ baseDirectories }) {
         auto interfaceDirectoriesGenex =
           cmStrCat("$<BUILD_INTERFACE:", dir, ">");

+ 1 - 3
Source/cmVisualStudio10TargetGenerator.cxx

@@ -2797,9 +2797,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
     auto const* fs =
       this->GeneratorTarget->GetFileSetForSource(config, source);
     const char* compileAsPerConfig = compileAs;
-    if (fs &&
-        (fs->GetType() == "CXX_MODULES"_s ||
-         fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
+    if (fs && fs->GetType() == "CXX_MODULES"_s) {
       if (lang == "CXX"_s) {
         if (fs->GetType() == "CXX_MODULES"_s) {
           if (shouldScanForModules &&

+ 0 - 1
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 12
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface-stderr.txt

@@ -1,12 +0,0 @@
-CMake Warning \(dev\) at FileSetModuleHeaderUnitsInterface.cmake:2 \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Error at FileSetModuleHeaderUnitsInterface.cmake:2 \(target_sources\):
-  target_sources File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS"
-  may not have "INTERFACE" visibility
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)

+ 0 - 8
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterface.cmake

@@ -1,8 +0,0 @@
-add_library(module-header)
-target_sources(module-header
-  INTERFACE
-    FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
-      sources/module-header.h)
-target_compile_features(module-header
-  PRIVATE
-    cxx_std_20)

+ 0 - 6
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterfaceImported-stderr.txt

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at FileSetModuleHeaderUnitsInterfaceImported.cmake:2 \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 8
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsInterfaceImported.cmake

@@ -1,8 +0,0 @@
-add_library(module-header INTERFACE IMPORTED)
-target_sources(module-header
-  INTERFACE
-    FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
-      sources/module-header.h)
-target_compile_features(module-header
-  INTERFACE
-    cxx_std_20)

+ 0 - 11
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPrivate-stderr.txt

@@ -1,11 +0,0 @@
-CMake Warning \(dev\) at FileSetModuleHeaderUnitsPrivate.cmake:7 \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\):
-  C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
-  experimental.  It is meant only for compiler developers to try.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 13
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPrivate.cmake

@@ -1,13 +0,0 @@
-enable_language(CXX)
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
-set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
-
-add_library(module-header
-  sources/cxx-anchor.cxx)
-target_sources(module-header
-  PRIVATE
-    FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
-      sources/module-header.h)
-target_compile_features(module-header
-  PRIVATE
-    cxx_std_20)

+ 0 - 11
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPublic-stderr.txt

@@ -1,11 +0,0 @@
-CMake Warning \(dev\) at FileSetModuleHeaderUnitsPublic.cmake:7 \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\):
-  C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
-  experimental.  It is meant only for compiler developers to try.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 13
Tests/RunCMake/CXXModules/FileSetModuleHeaderUnitsPublic.cmake

@@ -1,13 +0,0 @@
-enable_language(CXX)
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
-set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
-
-add_library(module-header
-  sources/cxx-anchor.cxx)
-target_sources(module-header
-  PUBLIC
-    FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
-      sources/module-header.h)
-target_compile_features(module-header
-  PRIVATE
-    cxx_std_20)

+ 2 - 2
Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt

@@ -6,7 +6,7 @@ Call Stack \(most recent call first\):
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 CMake Error at FileSetModulesInterface.cmake:2 \(target_sources\):
-  target_sources File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS"
-  may not have "INTERFACE" visibility
+  target_sources File set TYPE "CXX_MODULES" may not have "INTERFACE"
+  visibility
 Call Stack \(most recent call first\):
   CMakeLists.txt:6 \(include\)

+ 0 - 1
Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 22
Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits-stderr.txt

@@ -1,22 +0,0 @@
-CMake Warning \(dev\) at NotCXXSourceModuleHeaderUnits.cmake:7 \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:6 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Warning \(dev\):
-  C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
-  experimental.  It is meant only for compiler developers to try.
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Error in CMakeLists.txt:
-  Target "not-cxx-source" contains the source
-
-    .*/Tests/RunCMake/CXXModules/sources/c-anchor.c
-
-  in a file set of type "CXX_MODULE_HEADER_UNITS" but the source is not
-  classified as a "CXX" source.
-
-
-CMake Generate step failed.  Build files cannot be regenerated correctly.

+ 0 - 15
Tests/RunCMake/CXXModules/NotCXXSourceModuleHeaderUnits.cmake

@@ -1,15 +0,0 @@
-enable_language(C)
-enable_language(CXX)
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
-set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "")
-
-add_library(not-cxx-source)
-target_sources(not-cxx-source
-  PRIVATE
-    sources/cxx-anchor.cxx
-  PUBLIC
-    FILE_SET fs TYPE CXX_MODULE_HEADER_UNITS FILES
-      sources/c-anchor.c)
-target_compile_features(not-cxx-source
-  PRIVATE
-    cxx_std_20)

+ 1 - 2
Tests/RunCMake/CXXModules/RunCMakeTest.cmake

@@ -60,8 +60,7 @@ if (NOT generator_supports_cxx_modules)
 endif ()
 
 set(fileset_types
-  Modules
-  ModuleHeaderUnits)
+  Modules)
 set(scopes
   Interface
   Private

+ 1 - 2
Tests/RunCMake/target_sources/FileSetDefaultWrongTypeExperimental-stderr.txt

@@ -6,7 +6,6 @@ Call Stack \(most recent call first\):
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 CMake Error at FileSetDefaultWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\):
-  target_sources File set TYPE may only be "HEADERS", "CXX_MODULES", or
-  "CXX_MODULE_HEADER_UNITS"
+  target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES"
 Call Stack \(most recent call first\):
   CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 2
Tests/RunCMake/target_sources/FileSetWrongTypeExperimental-stderr.txt

@@ -6,7 +6,6 @@ Call Stack \(most recent call first\):
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
 CMake Error at FileSetWrongTypeExperimental\.cmake:[0-9]+ \(target_sources\):
-  target_sources File set TYPE may only be "HEADERS", "CXX_MODULES", or
-  "CXX_MODULE_HEADER_UNITS"
+  target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES"
 Call Stack \(most recent call first\):
   CMakeLists\.txt:[0-9]+ \(include\)$