Browse Source

cmExperimental: remove the flag for C++ modules

All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
Ben Boeckel 2 years ago
parent
commit
0c07f39006
100 changed files with 156 additions and 652 deletions
  1. 0 3
      Auxiliary/vim/syntax/cmake.vim
  2. 1 4
      Help/command/export.rst
  3. 2 8
      Help/command/install.rst
  4. 1 4
      Help/command/target_sources.rst
  5. 2 5
      Help/command/try_compile.rst
  6. 0 130
      Help/dev/experimental.rst
  7. 1 6
      Help/prop_sf/CXX_SCAN_FOR_MODULES.rst
  8. 1 5
      Help/prop_tgt/CXX_MODULE_DIRS.rst
  9. 1 5
      Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst
  10. 1 5
      Help/prop_tgt/CXX_MODULE_SET.rst
  11. 1 5
      Help/prop_tgt/CXX_MODULE_SETS.rst
  12. 1 5
      Help/prop_tgt/CXX_MODULE_SET_NAME.rst
  13. 1 6
      Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst
  14. 0 4
      Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst
  15. 0 4
      Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst
  16. 0 4
      Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst
  17. 0 4
      Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst
  18. 0 4
      Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst
  19. 1 5
      Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst
  20. 8 0
      Help/release/dev/cxxmodules-no-longer-experimental.rst
  21. 1 6
      Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst
  22. 4 13
      Source/cmCoreTryCompile.cxx
  23. 0 11
      Source/cmExperimental.cxx
  24. 0 1
      Source/cmExperimental.h
  25. 5 10
      Source/cmExportCommand.cxx
  26. 5 11
      Source/cmGeneratorTarget.cxx
  27. 2 2
      Source/cmGeneratorTarget.h
  28. 4 21
      Source/cmInstallCommand.cxx
  29. 10 21
      Source/cmTargetSourcesCommand.cxx
  30. 0 2
      Tests/RunCMake/CXXModules/CMakeLists.txt
  31. 0 6
      Tests/RunCMake/CXXModules/ExportBuildCxxModules-stderr.txt
  32. 0 6
      Tests/RunCMake/CXXModules/ExportInstallCxxModules-stderr.txt
  33. 0 7
      Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt
  34. 0 6
      Tests/RunCMake/CXXModules/FileSetModulesInterfaceImported-stderr.txt
  35. 0 6
      Tests/RunCMake/CXXModules/FileSetModulesPrivate-stderr.txt
  36. 0 6
      Tests/RunCMake/CXXModules/FileSetModulesPublic-stderr.txt
  37. 0 6
      Tests/RunCMake/CXXModules/InstallBMI-stderr.txt
  38. 0 6
      Tests/RunCMake/CXXModules/InstallBMIGenericArgs-stderr.txt
  39. 0 6
      Tests/RunCMake/CXXModules/InstallBMIIgnore-stderr.txt
  40. 0 6
      Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-stderr.txt
  41. 0 6
      Tests/RunCMake/CXXModules/NinjaDependInfoExport-stderr.txt
  42. 0 6
      Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-stderr.txt
  43. 0 7
      Tests/RunCMake/CXXModules/NoCXX-stderr.txt
  44. 0 7
      Tests/RunCMake/CXXModules/NoCXX20-stderr.txt
  45. 0 1
      Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-result.txt
  46. 0 20
      Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-stderr.txt
  47. 0 14
      Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake
  48. 0 7
      Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt
  49. 0 7
      Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt
  50. 0 7
      Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt
  51. 0 4
      Tests/RunCMake/CXXModules/RunCMakeTest.cmake
  52. 0 4
      Tests/RunCMake/CXXModules/examples/circular-stderr.txt
  53. 0 2
      Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake
  54. 0 4
      Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt
  55. 0 4
      Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt
  56. 0 4
      Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt
  57. 0 2
      Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt
  58. 0 4
      Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt
  59. 0 2
      Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt
  60. 0 4
      Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt
  61. 0 4
      Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt
  62. 0 4
      Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt
  63. 0 4
      Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt
  64. 0 2
      Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt
  65. 0 4
      Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt
  66. 0 2
      Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt
  67. 0 4
      Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt
  68. 0 2
      Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt
  69. 0 4
      Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt
  70. 0 2
      Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt
  71. 0 4
      Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt
  72. 0 2
      Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt
  73. 0 4
      Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt
  74. 0 2
      Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt
  75. 0 4
      Tests/RunCMake/CXXModules/examples/generated-stderr.txt
  76. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt
  77. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt
  78. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt
  79. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt
  80. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt
  81. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt
  82. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt
  83. 0 7
      Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt
  84. 0 4
      Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt
  85. 0 4
      Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt
  86. 0 4
      Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt
  87. 0 4
      Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt
  88. 0 4
      Tests/RunCMake/CXXModules/examples/library-static-stderr.txt
  89. 0 4
      Tests/RunCMake/CXXModules/examples/object-library-stderr.txt
  90. 0 4
      Tests/RunCMake/CXXModules/examples/partitions-stderr.txt
  91. 0 4
      Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt
  92. 0 4
      Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt
  93. 0 4
      Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt
  94. 0 4
      Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt
  95. 0 4
      Tests/RunCMake/CXXModules/examples/simple-stderr.txt
  96. 0 4
      Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt
  97. 0 4
      Tests/RunCMake/CXXModules/examples/try-run-stderr.txt
  98. 34 0
      Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
  99. 68 0
      Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
  100. 1 1
      Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt

+ 0 - 3
Auxiliary/vim/syntax/cmake.vim

@@ -3137,7 +3137,6 @@ syn keyword cmakeKWexecute_process contained
 syn keyword cmakeKWexport contained
 syn keyword cmakeKWexport contained
             \ ANDROID_MK
             \ ANDROID_MK
             \ APPEND
             \ APPEND
-            \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
             \ CONFIG
             \ CONFIG
             \ CXX_MODULES_DIRECTORY
             \ CXX_MODULES_DIRECTORY
             \ EXPORT
             \ EXPORT
@@ -3707,7 +3706,6 @@ syn keyword cmakeKWinstall contained
             \ BUILD_TYPE
             \ BUILD_TYPE
             \ BUNDLE
             \ BUNDLE
             \ BUNDLE_EXECUTABLE
             \ BUNDLE_EXECUTABLE
-            \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
             \ CMAKE_INSTALL_BINDIR
             \ CMAKE_INSTALL_BINDIR
             \ CMAKE_INSTALL_DATADIR
             \ CMAKE_INSTALL_DATADIR
             \ CMAKE_INSTALL_DATAROOTDIR
             \ CMAKE_INSTALL_DATAROOTDIR
@@ -4258,7 +4256,6 @@ syn keyword cmakeKWtarget_sources contained
             \ ALIAS
             \ ALIAS
             \ BASE_DIRS
             \ BASE_DIRS
             \ BUILD_INTERFACE
             \ BUILD_INTERFACE
-            \ CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
             \ CONFIG
             \ CONFIG
             \ CORRECT
             \ CORRECT
             \ CXX_MODULES
             \ CXX_MODULES

+ 1 - 4
Help/command/export.rst

@@ -54,10 +54,7 @@ The options are:
   to support consumers using CMake versions older than 2.8.12.
   to support consumers using CMake versions older than 2.8.12.
 
 
 ``CXX_MODULES_DIRECTORY <directory>``
 ``CXX_MODULES_DIRECTORY <directory>``
-
-  .. note ::
-
-    Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+  .. versionadded:: 3.28
 
 
   Export C++ module properties to files under the given directory. Each file
   Export C++ module properties to files under the given directory. Each file
   will be named according to the target's export name (without any namespace).
   will be named according to the target's export name (without any namespace).

+ 2 - 8
Help/command/install.rst

@@ -232,10 +232,7 @@ Signatures
     would be installed to ``myproj/here.h`` below the destination.
     would be installed to ``myproj/here.h`` below the destination.
 
 
   ``CXX_MODULES_BMI``
   ``CXX_MODULES_BMI``
-
-    .. note ::
-
-      Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+    .. versionadded:: 3.28
 
 
     Any module files from C++ modules from ``PUBLIC`` sources in a file set of
     Any module files from C++ modules from ``PUBLIC`` sources in a file set of
     type ``CXX_MODULES`` will be installed to the given ``DESTINATION``. All
     type ``CXX_MODULES`` will be installed to the given ``DESTINATION``. All
@@ -843,10 +840,7 @@ Signatures
     and defines required to use the libraries.
     and defines required to use the libraries.
 
 
   ``CXX_MODULES_DIRECTORY``
   ``CXX_MODULES_DIRECTORY``
-
-    .. note ::
-
-      Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+    .. versionadded:: 3.28
 
 
     Specify a subdirectory to store C++ module information for targets in the
     Specify a subdirectory to store C++ module information for targets in the
     export set. This directory will be populated with files which add the
     export set. This directory will be populated with files which add the

+ 1 - 4
Help/command/target_sources.rst

@@ -84,10 +84,7 @@ files within those directories. The acceptable types include:
   Sources intended to be used via a language's ``#include`` mechanism.
   Sources intended to be used via a language's ``#include`` mechanism.
 
 
 ``CXX_MODULES``
 ``CXX_MODULES``
-
-  .. note ::
-
-    Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+  .. versionadded:: 3.28
 
 
   Sources which contain C++ interface module or partition units (i.e., those
   Sources which contain C++ interface module or partition units (i.e., those
   using the ``export`` keyword). This file set type may not have an
   using the ``export`` keyword). This file set type may not have an

+ 2 - 5
Help/command/try_compile.rst

@@ -261,14 +261,11 @@ The options for the above signatures are:
     Sources are not added to any ``FILE_SET`` in the generated project.
     Sources are not added to any ``FILE_SET`` in the generated project.
 
 
   ``CXX_MODULE``
   ``CXX_MODULE``
+    .. versionadded:: 3.28
+
     Sources are added to a ``FILE_SET`` of type ``CXX_MODULES`` in the
     Sources are added to a ``FILE_SET`` of type ``CXX_MODULES`` in the
     generated project.
     generated project.
 
 
-  .. note ::
-
-    Experimental. Sources of type ``CXX_MODULE`` are gated by
-    ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
   The default type of sources is ``NORMAL``.
   The default type of sources is ``NORMAL``.
 
 
 ``<LANG>_STANDARD <std>``
 ``<LANG>_STANDARD <std>``

+ 0 - 130
Help/dev/experimental.rst

@@ -13,133 +13,3 @@ specific values will change over time to reinforce their experimental nature.
 When used, a warning will be generated to indicate that an experimental
 When used, a warning will be generated to indicate that an experimental
 feature is in use and that the affected behavior in the project is not part of
 feature is in use and that the affected behavior in the project is not part of
 CMake's stability guarantees.
 CMake's stability guarantees.
-
-C++20 Module APIs
-=================
-
-Variable: ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-Value: ``ac01f462-0f5f-432a-86aa-acef252918a6``
-
-In order to support C++20 modules, there are a number of behaviors that have
-CMake APIs to provide the required features to build and export them from a
-project.
-
-Limitations
------------
-
-There are a number of known limitations of the current C++20 module support in
-CMake.  This does not document known limitations or bugs in compilers as these
-can change over time.
-
-For all generators:
-
-- Only in-project modules may be used.  While there is some support for
-  exporting module information, there is no mechanism for using it at the
-  moment.
-
-For the Ninja Generators:
-
-- ``ninja`` 1.10 or newer is required.
-
-For the Visual Studio Generators:
-
-- Only Visual Studio 2022 and toolchains newer than 19.34 (Visual Studio
-  17.4).
-- No support for exporting or installing BMI or module information.
-- No diagnosis of using modules provided by ``PRIVATE`` sources from
-  ``PUBLIC`` module sources.
-
-C++20 Module Dependencies
-=========================
-
-The Ninja generator has experimental infrastructure supporting C++20 module
-dependency scanning.  This is similar to the Fortran modules support, but
-relies on external tools to scan C++20 translation units for module
-dependencies.  The approach is described by Kitware's `D1483r1`_ paper.
-
-In order to activate CMake's experimental support for C++20 module
-dependencies, set the following variables:
-
-``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-  Set this to the UUID documented above.
-
-Some compilers already have support for module dependency scanning:
-
-* MSVC 19.34 and newer (provided with Visual Studio 17.4 and newer)
-* LLVM/Clang 16.0 and newer
-
-For those, only the above variables need to be set by project code.
-For compilers with in-development support, additional variables must
-be set as follows.
-
-``CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE``
-  Set this to tell CMake how to invoke the C++20 module dependency
-  scanning tool.
-
-``CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT``
-  Set this for compilers that generate module maps.  See below.
-
-``CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG``
-  Set this for compilers that generate module maps.  See below.
-
-For example, add code like the following to a test project:
-
-.. code-block:: cmake
-
-  string(CONCAT CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE
-    "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> <SOURCE>"
-    " -MT <DYNDEP_FILE> -MD -MF <DEP_FILE>"
-    " ${flags_to_scan_deps} -fdep-file=<DYNDEP_FILE> -fdep-output=<OBJECT>"
-    )
-
-The tool specified by ``CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE`` is
-expected to process the translation unit, write preprocessor dependencies
-to the file specified by the ``<DEP_FILE>`` placeholder, and write module
-dependencies to the file specified by the ``<DYNDEP_FILE>`` placeholder. The
-``CMAKE_EXPERIMENTAL_CXX_SCANDEP_DEPFILE_FORMAT`` file may be set to ``msvc``
-for scandep rules which use ``msvc``-style dependency reporting.
-
-In order to support ``IMPORTED`` targets with associated C++20 module sources,
-the ``CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG`` variable must be provided
-to have the compiler only output a BMI instead of a BMI and an object file.
-
-The module dependencies should be written in the format described
-by the `P1689r5`_ paper.
-
-Compiler writers may try out their scanning functionality using
-the `cxx-modules-sandbox`_ test project, modified to set variables
-as above for their compiler.
-
-For compilers that generate module maps, tell CMake as follows:
-
-.. code-block:: cmake
-
-  set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc")
-  set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG
-    "${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>")
-  set(CMAKE_EXPERIMENTAL_CXX_MODULE_BMI_ONLY_FLAG
-    "-fmodule-only")
-
-Currently, the only supported formats are, ``clang``, ``gcc``, and ``msvc``.
-The ``gcc`` format is described in the GCC documentation, but the relevant
-section for the purposes of CMake is:
-
-    A mapping file consisting of space-separated module-name, filename
-    pairs, one per line.  Only the mappings for the direct imports and any
-    module export name need be provided.  If other mappings are provided,
-    they override those stored in any imported CMI files.  A repository
-    root may be specified in the mapping file by using ``$root`` as the
-    module name in the first active line.
-
-    -- GCC module mapper documentation
-
-The ``msvc`` format is a response file containing flags required to compile
-any module interfaces properly as well as find any required files to satisfy
-``import`` statements as required for Microsoft's Visual Studio toolchains.
-
-Similarly, the ``clang`` format is a response file containing flags using
-Clang's module flags.
-
-.. _`D1483r1`: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html
-.. _`P1689r5`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html
-.. _`cxx-modules-sandbox`: https://github.com/mathstuf/cxx-modules-sandbox

+ 1 - 6
Help/prop_sf/CXX_SCAN_FOR_MODULES.rst

@@ -1,7 +1,7 @@
 CXX_SCAN_FOR_MODULES
 CXX_SCAN_FOR_MODULES
 --------------------
 --------------------
 
 
-.. versionadded:: 3.26
+.. versionadded:: 3.28
 
 
 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan the
 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan the
 source for C++ module dependencies.  See also the
 source for C++ module dependencies.  See also the
@@ -16,8 +16,3 @@ consulted.
 Note that scanning is only performed if C++20 or higher is enabled for the
 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
 target and the source uses the ``CXX`` language.  Scanning for modules in
 sources belonging to file sets of type ``CXX_MODULES`` is always performed.
 sources belonging to file sets of type ``CXX_MODULES`` is always performed.
-
-.. note ::
-
-  This setting is meaningful only when experimental support for C++ modules
-  has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate.

+ 1 - 5
Help/prop_tgt/CXX_MODULE_DIRS.rst

@@ -1,11 +1,7 @@
 CXX_MODULE_DIRS
 CXX_MODULE_DIRS
 ---------------
 ---------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Semicolon-separated list of base directories of the target's default
 Semicolon-separated list of base directories of the target's default
 C++ module set (i.e. the file set with name and type ``CXX_MODULES``). The
 C++ module set (i.e. the file set with name and type ``CXX_MODULES``). The

+ 1 - 5
Help/prop_tgt/CXX_MODULE_DIRS_NAME.rst

@@ -1,11 +1,7 @@
 CXX_MODULE_DIRS_<NAME>
 CXX_MODULE_DIRS_<NAME>
 ----------------------
 ----------------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Semicolon-separated list of base directories of the target's ``<NAME>`` C++
 Semicolon-separated list of base directories of the target's ``<NAME>`` C++
 module set, which has the set type ``CXX_MODULES``. The property supports
 module set, which has the set type ``CXX_MODULES``. The property supports

+ 1 - 5
Help/prop_tgt/CXX_MODULE_SET.rst

@@ -1,11 +1,7 @@
 CXX_MODULE_SET
 CXX_MODULE_SET
 --------------
 --------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Semicolon-separated list of files in the target's default C++ module set,
 Semicolon-separated list of files in the target's default C++ module set,
 (i.e. the file set with name and type ``CXX_MODULES``). If any of the paths
 (i.e. the file set with name and type ``CXX_MODULES``). If any of the paths

+ 1 - 5
Help/prop_tgt/CXX_MODULE_SETS.rst

@@ -1,11 +1,7 @@
 CXX_MODULE_SETS
 CXX_MODULE_SETS
 ---------------
 ---------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` C++ module sets (i.e.
 Read-only list of the target's ``PRIVATE`` and ``PUBLIC`` C++ module sets (i.e.
 all file sets with the type ``CXX_MODULES``). Files listed in these file sets
 all file sets with the type ``CXX_MODULES``). Files listed in these file sets

+ 1 - 5
Help/prop_tgt/CXX_MODULE_SET_NAME.rst

@@ -1,11 +1,7 @@
 CXX_MODULE_SET_<NAME>
 CXX_MODULE_SET_<NAME>
 ---------------------
 ---------------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Semicolon-separated list of files in the target's ``<NAME>`` C++ module set,
 Semicolon-separated list of files in the target's ``<NAME>`` C++ module set,
 which has the set type ``CXX_MODULES``. If any of the paths are relative, they
 which has the set type ``CXX_MODULES``. If any of the paths are relative, they

+ 1 - 6
Help/prop_tgt/CXX_SCAN_FOR_MODULES.rst

@@ -1,7 +1,7 @@
 CXX_SCAN_FOR_MODULES
 CXX_SCAN_FOR_MODULES
 --------------------
 --------------------
 
 
-.. versionadded:: 3.26
+.. versionadded:: 3.28
 
 
 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan C++
 ``CXX_SCAN_FOR_MODULES`` is a boolean specifying whether CMake will scan C++
 sources in the target for module dependencies.  See also the
 sources in the target for module dependencies.  See also the
@@ -20,8 +20,3 @@ scan the target's ``CXX`` sources at build time.
 Note that scanning is only performed if C++20 or higher is enabled for the
 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
 target.  Scanning for modules in the target's sources belonging to file sets
 of type ``CXX_MODULES`` is always performed.
 of type ``CXX_MODULES`` is always performed.
-
-.. note ::
-
-  This setting is meaningful only when experimental support for C++ modules
-  has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate.

+ 0 - 4
Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS.rst

@@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS
 
 
 .. versionadded:: 3.28
 .. versionadded:: 3.28
 
 
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
 Preprocessor definitions for compiling an ``IMPORTED`` target's C++ module
 Preprocessor definitions for compiling an ``IMPORTED`` target's C++ module
 sources.
 sources.
 
 

+ 0 - 4
Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_FEATURES.rst

@@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_FEATURES
 
 
 .. versionadded:: 3.28
 .. versionadded:: 3.28
 
 
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
 Compiler features enabled for this ``IMPORTED`` target's C++ modules.
 Compiler features enabled for this ``IMPORTED`` target's C++ modules.
 
 
 The value of this property is used by the generators to set the include
 The value of this property is used by the generators to set the include

+ 0 - 4
Help/prop_tgt/IMPORTED_CXX_MODULES_COMPILE_OPTIONS.rst

@@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_COMPILE_OPTIONS
 
 
 .. versionadded:: 3.28
 .. versionadded:: 3.28
 
 
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
 List of options to pass to the compiler for this ``IMPORTED`` target's C++
 List of options to pass to the compiler for this ``IMPORTED`` target's C++
 modules.
 modules.
 
 

+ 0 - 4
Help/prop_tgt/IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES.rst

@@ -3,10 +3,6 @@ IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES
 
 
 .. versionadded:: 3.28
 .. versionadded:: 3.28
 
 
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
 List of preprocessor include file search directories when compiling C++
 List of preprocessor include file search directories when compiling C++
 modules for ``IMPORTED`` targets.
 modules for ``IMPORTED`` targets.
 
 

+ 0 - 4
Help/prop_tgt/IMPORTED_CXX_MODULES_LINK_LIBRARIES.rst

@@ -3,9 +3,5 @@ IMPORTED_CXX_MODULES_LINK_LIBRARIES
 
 
 .. versionadded:: 3.28
 .. versionadded:: 3.28
 
 
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
-
 List of direct dependencies to use for usage requirements for C++ modules in
 List of direct dependencies to use for usage requirements for C++ modules in
 the target's C++ modules.
 the target's C++ modules.

+ 1 - 5
Help/prop_tgt/INTERFACE_CXX_MODULE_SETS.rst

@@ -1,11 +1,7 @@
 INTERFACE_CXX_MODULE_SETS
 INTERFACE_CXX_MODULE_SETS
 -------------------------
 -------------------------
 
 
-.. versionadded:: 3.25
-
-.. note ::
-
-  Experimental. Gated by ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API``
+.. versionadded:: 3.28
 
 
 Read-only list of the target's ``PUBLIC`` C++ module sets (i.e. all file sets
 Read-only list of the target's ``PUBLIC`` C++ module sets (i.e. all file sets
 with the type ``CXX_MODULES``). Files listed in these C++ module sets can be
 with the type ``CXX_MODULES``). Files listed in these C++ module sets can be

+ 8 - 0
Help/release/dev/cxxmodules-no-longer-experimental.rst

@@ -0,0 +1,8 @@
+cxxmodules-no-longer-experimental
+---------------------------------
+
+* C++ 20 named modules are now supported by :ref:`Ninja Generators`
+  and :ref:`Visual Studio Generators` for VS 2022 and newer, in combination
+  with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang
+  16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer.
+  See :manual:`cmake-cxxmodules(7)` for details.

+ 1 - 6
Help/variable/CMAKE_CXX_SCAN_FOR_MODULES.rst

@@ -1,15 +1,10 @@
 CMAKE_CXX_SCAN_FOR_MODULES
 CMAKE_CXX_SCAN_FOR_MODULES
 --------------------------
 --------------------------
 
 
-.. versionadded:: 3.26
+.. versionadded:: 3.28
 
 
 Whether to scan C++ source files for module dependencies.
 Whether to scan C++ source files for module dependencies.
 
 
 This variable is used to initialize the :prop_tgt:`CXX_SCAN_FOR_MODULES`
 This variable is used to initialize the :prop_tgt:`CXX_SCAN_FOR_MODULES`
 property on all the targets.  See that target property for additional
 property on all the targets.  See that target property for additional
 information.
 information.
-
-.. note ::
-
-  This setting is meaningful only when experimental support for C++ modules
-  has been enabled by the ``CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API`` gate.

+ 4 - 13
Source/cmCoreTryCompile.cxx

@@ -235,25 +235,16 @@ ArgumentParser::Continue cmCoreTryCompile::Arguments::SetSourceType(
     this->SourceTypeContext = SourceType::Normal;
     this->SourceTypeContext = SourceType::Normal;
     matched = true;
     matched = true;
   } else if (sourceType == "CXX_MODULE"_s) {
   } else if (sourceType == "CXX_MODULE"_s) {
-    bool const supportCxxModuleSources = cmExperimental::HasSupportEnabled(
-      *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
-    if (supportCxxModuleSources) {
-      this->SourceTypeContext = SourceType::CxxModule;
-      matched = true;
-    }
+    this->SourceTypeContext = SourceType::CxxModule;
+    matched = true;
   }
   }
 
 
   if (!matched && this->SourceTypeError.empty()) {
   if (!matched && this->SourceTypeError.empty()) {
-    bool const supportCxxModuleSources = cmExperimental::HasSupportEnabled(
-      *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
-    auto const* message = "'SOURCE'";
-    if (supportCxxModuleSources) {
-      message = "one of 'SOURCE' or 'CXX_MODULE'";
-    }
     // Only remember one error at a time; all other errors related to argument
     // Only remember one error at a time; all other errors related to argument
     // parsing are "indicate one error and return" anyways.
     // parsing are "indicate one error and return" anyways.
     this->SourceTypeError =
     this->SourceTypeError =
-      cmStrCat("Invalid 'SOURCE_TYPE' '", sourceType, "'; must be ", message);
+      cmStrCat("Invalid 'SOURCE_TYPE' '", sourceType,
+               "'; must be one of 'SOURCE' or 'CXX_MODULE'");
   }
   }
   return ArgumentParser::Continue::Yes;
   return ArgumentParser::Continue::Yes;
 }
 }

+ 0 - 11
Source/cmExperimental.cxx

@@ -19,17 +19,6 @@ namespace {
  * up-to-date.
  * up-to-date.
  */
  */
 cmExperimental::FeatureData LookupTable[] = {
 cmExperimental::FeatureData LookupTable[] = {
-  // CxxModuleCMakeApi
-  { "CxxModuleCMakeApi",
-    "ac01f462-0f5f-432a-86aa-acef252918a6",
-    "CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API",
-    "CMake's C++ module support is experimental. It is meant only for "
-    "experimentation and feedback to CMake developers.",
-    { "CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE",
-      "CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT",
-      "CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG" },
-    cmExperimental::TryCompileCondition::SkipCompilerChecks,
-    false },
   // WindowsKernelModeDriver
   // WindowsKernelModeDriver
   { "WindowsKernelModeDriver",
   { "WindowsKernelModeDriver",
     "5c2d848d-4efa-4529-a768-efd57171bf68",
     "5c2d848d-4efa-4529-a768-efd57171bf68",

+ 0 - 1
Source/cmExperimental.h

@@ -15,7 +15,6 @@ class cmExperimental
 public:
 public:
   enum class Feature
   enum class Feature
   {
   {
-    CxxModuleCMakeApi,
     WindowsKernelModeDriver,
     WindowsKernelModeDriver,
 
 
     Sentinel,
     Sentinel,

+ 5 - 10
Source/cmExportCommand.cxx

@@ -16,7 +16,6 @@
 #include "cmArgumentParserTypes.h"
 #include "cmArgumentParserTypes.h"
 #include "cmCryptoHash.h"
 #include "cmCryptoHash.h"
 #include "cmExecutionStatus.h"
 #include "cmExecutionStatus.h"
-#include "cmExperimental.h"
 #include "cmExportBuildAndroidMKGenerator.h"
 #include "cmExportBuildAndroidMKGenerator.h"
 #include "cmExportBuildFileGenerator.h"
 #include "cmExportBuildFileGenerator.h"
 #include "cmExportSet.h"
 #include "cmExportSet.h"
@@ -69,15 +68,11 @@ bool cmExportCommand(std::vector<std::string> const& args,
     bool ExportOld = false;
     bool ExportOld = false;
   };
   };
 
 
-  auto parser = cmArgumentParser<Arguments>{}
-                  .Bind("NAMESPACE"_s, &Arguments::Namespace)
-                  .Bind("FILE"_s, &Arguments::Filename);
-
-  bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled(
-    status.GetMakefile(), cmExperimental::Feature::CxxModuleCMakeApi);
-  if (supportCxx20FileSetTypes) {
-    parser.Bind("CXX_MODULES_DIRECTORY"_s, &Arguments::CxxModulesDirectory);
-  }
+  auto parser =
+    cmArgumentParser<Arguments>{}
+      .Bind("NAMESPACE"_s, &Arguments::Namespace)
+      .Bind("FILE"_s, &Arguments::Filename)
+      .Bind("CXX_MODULES_DIRECTORY"_s, &Arguments::CxxModulesDirectory);
 
 
   if (args[0] == "EXPORT") {
   if (args[0] == "EXPORT") {
     parser.Bind("EXPORT"_s, &Arguments::ExportSetName);
     parser.Bind("EXPORT"_s, &Arguments::ExportSetName);

+ 5 - 11
Source/cmGeneratorTarget.cxx

@@ -31,7 +31,6 @@
 #include "cmCustomCommandGenerator.h"
 #include "cmCustomCommandGenerator.h"
 #include "cmCxxModuleUsageEffects.h"
 #include "cmCxxModuleUsageEffects.h"
 #include "cmEvaluatedTargetProperty.h"
 #include "cmEvaluatedTargetProperty.h"
-#include "cmExperimental.h"
 #include "cmFileSet.h"
 #include "cmFileSet.h"
 #include "cmFileTimes.h"
 #include "cmFileTimes.h"
 #include "cmGeneratedFileStream.h"
 #include "cmGeneratedFileStream.h"
@@ -9106,9 +9105,10 @@ cmGeneratorTarget::Cxx20SupportLevel cmGeneratorTarget::HaveCxxModuleSupport(
   // Else, an empty CMAKE_CXX_STANDARD_DEFAULT means CMake does not detect and
   // Else, an empty CMAKE_CXX_STANDARD_DEFAULT means CMake does not detect and
   // set a default standard level for this compiler, so assume all standards
   // set a default standard level for this compiler, so assume all standards
   // are available.
   // are available.
-  if (!cmExperimental::HasSupportEnabled(
-        *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi)) {
-    return Cxx20SupportLevel::MissingExperimentalFlag;
+  cmValue scandepRule =
+    this->Target->GetMakefile()->GetDefinition("CMAKE_CXX_SCANDEP_SOURCE");
+  if (!scandepRule) {
+    return Cxx20SupportLevel::MissingRule;
   }
   }
   return Cxx20SupportLevel::Supported;
   return Cxx20SupportLevel::Supported;
 }
 }
@@ -9125,13 +9125,6 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
                    "\" has C++ sources that export modules but the \"CXX\" "
                    "\" has C++ sources that export modules but the \"CXX\" "
                    "language has not been enabled"));
                    "language has not been enabled"));
         break;
         break;
-      case cmGeneratorTarget::Cxx20SupportLevel::MissingExperimentalFlag:
-        this->Makefile->IssueMessage(
-          MessageType::FATAL_ERROR,
-          cmStrCat("The target named \"", this->GetName(),
-                   "\" has C++ sources that export modules but its "
-                   "experimental support has not been requested"));
-        break;
       case cmGeneratorTarget::Cxx20SupportLevel::NoCxx20: {
       case cmGeneratorTarget::Cxx20SupportLevel::NoCxx20: {
         cmStandardLevelResolver standardResolver(this->Makefile);
         cmStandardLevelResolver standardResolver(this->Makefile);
         auto effStandard =
         auto effStandard =
@@ -9149,6 +9142,7 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
             "\"cxx_std_20\" (or newer) among its `target_compile_features`",
             "\"cxx_std_20\" (or newer) among its `target_compile_features`",
             effStandard));
             effStandard));
       } break;
       } break;
+      case cmGeneratorTarget::Cxx20SupportLevel::MissingRule:
       case cmGeneratorTarget::Cxx20SupportLevel::Supported:
       case cmGeneratorTarget::Cxx20SupportLevel::Supported:
         // All is well.
         // All is well.
         break;
         break;

+ 2 - 2
Source/cmGeneratorTarget.h

@@ -1288,10 +1288,10 @@ public:
   {
   {
     // C++ is not available.
     // C++ is not available.
     MissingCxx,
     MissingCxx,
-    // The experimental feature is not available.
-    MissingExperimentalFlag,
     // The target does not require at least C++20.
     // The target does not require at least C++20.
     NoCxx20,
     NoCxx20,
+    // C++20 module scanning rules are not present.
+    MissingRule,
     // C++20 modules are available and working.
     // C++20 modules are available and working.
     Supported,
     Supported,
   };
   };

+ 4 - 21
Source/cmInstallCommand.cxx

@@ -21,7 +21,6 @@
 #include "cmArgumentParser.h"
 #include "cmArgumentParser.h"
 #include "cmArgumentParserTypes.h"
 #include "cmArgumentParserTypes.h"
 #include "cmExecutionStatus.h"
 #include "cmExecutionStatus.h"
-#include "cmExperimental.h"
 #include "cmExportSet.h"
 #include "cmExportSet.h"
 #include "cmFileSet.h"
 #include "cmFileSet.h"
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorExpression.h"
@@ -491,6 +490,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
   publicHeaderArgs.Parse(argVectors.PublicHeader, &unknownArgs);
   publicHeaderArgs.Parse(argVectors.PublicHeader, &unknownArgs);
   resourceArgs.Parse(argVectors.Resource, &unknownArgs);
   resourceArgs.Parse(argVectors.Resource, &unknownArgs);
   includesArgs.Parse(&argVectors.Includes, &unknownArgs);
   includesArgs.Parse(&argVectors.Includes, &unknownArgs);
+  cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs);
   for (std::size_t i = 0; i < argVectors.FileSets.size(); i++) {
   for (std::size_t i = 0; i < argVectors.FileSets.size(); i++) {
     // We have to create a separate object for the parsing because
     // We have to create a separate object for the parsing because
     // cmArgumentParser<void>::Bind() binds to a specific address, but the
     // cmArgumentParser<void>::Bind() binds to a specific address, but the
@@ -501,15 +501,6 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
     fileSetArgs[i] = std::move(fileSetArg);
     fileSetArgs[i] = std::move(fileSetArg);
   }
   }
 
 
-  bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled(
-    *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
-  if (!supportCxx20FileSetTypes) {
-    std::copy(argVectors.CxxModulesBmi.begin(), argVectors.CxxModulesBmi.end(),
-              std::back_inserter(unknownArgs));
-  } else {
-    cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs);
-  }
-
   if (!unknownArgs.empty()) {
   if (!unknownArgs.empty()) {
     // Unknown argument.
     // Unknown argument.
     status.SetError(
     status.SetError(
@@ -541,12 +532,10 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
   success = success && privateHeaderArgs.Finalize();
   success = success && privateHeaderArgs.Finalize();
   success = success && publicHeaderArgs.Finalize();
   success = success && publicHeaderArgs.Finalize();
   success = success && resourceArgs.Finalize();
   success = success && resourceArgs.Finalize();
+  success = success && cxxModuleBmiArgs.Finalize();
   for (auto& fileSetArg : fileSetArgs) {
   for (auto& fileSetArg : fileSetArgs) {
     success = success && fileSetArg.Finalize();
     success = success && fileSetArg.Finalize();
   }
   }
-  if (supportCxx20FileSetTypes) {
-    success = success && cxxModuleBmiArgs.Finalize();
-  }
 
 
   if (!success) {
   if (!success) {
     return false;
     return false;
@@ -1173,8 +1162,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args,
       }
       }
     }
     }
 
 
-    if (supportCxx20FileSetTypes &&
-        !cxxModuleBmiArgs.GetDestination().empty()) {
+    if (!cxxModuleBmiArgs.GetDestination().empty()) {
       cxxModuleBmiGenerator = cm::make_unique<cmInstallCxxModuleBmiGenerator>(
       cxxModuleBmiGenerator = cm::make_unique<cmInstallCxxModuleBmiGenerator>(
         target.GetName(),
         target.GetName(),
         helper.GetCxxModulesBmiDestination(&cxxModuleBmiArgs),
         helper.GetCxxModulesBmiDestination(&cxxModuleBmiArgs),
@@ -2071,12 +2059,7 @@ bool HandleExportMode(std::vector<std::string> const& args,
   ica.Bind("NAMESPACE"_s, name_space);
   ica.Bind("NAMESPACE"_s, name_space);
   ica.Bind("EXPORT_LINK_INTERFACE_LIBRARIES"_s, exportOld);
   ica.Bind("EXPORT_LINK_INTERFACE_LIBRARIES"_s, exportOld);
   ica.Bind("FILE"_s, filename);
   ica.Bind("FILE"_s, filename);
-
-  bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled(
-    *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
-  if (supportCxx20FileSetTypes) {
-    ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory);
-  }
+  ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory);
 
 
   std::vector<std::string> unknownArgs;
   std::vector<std::string> unknownArgs;
   ica.Parse(args, &unknownArgs);
   ica.Parse(args, &unknownArgs);

+ 10 - 21
Source/cmTargetSourcesCommand.cxx

@@ -10,7 +10,6 @@
 
 
 #include "cmArgumentParser.h"
 #include "cmArgumentParser.h"
 #include "cmArgumentParserTypes.h"
 #include "cmArgumentParserTypes.h"
-#include "cmExperimental.h"
 #include "cmFileSet.h"
 #include "cmFileSet.h"
 #include "cmGeneratorExpression.h"
 #include "cmGeneratorExpression.h"
 #include "cmList.h"
 #include "cmList.h"
@@ -260,28 +259,18 @@ bool TargetSourcesImpl::HandleOneFileSet(
       this->SetError("Must specify a TYPE when creating file set");
       this->SetError("Must specify a TYPE when creating file set");
       return false;
       return false;
     }
     }
-    bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled(
-      *this->Makefile, cmExperimental::Feature::CxxModuleCMakeApi);
+    if (type != "HEADERS"_s && type != "CXX_MODULES"_s) {
+      this->SetError(
+        R"(File set TYPE may only be "HEADERS" or "CXX_MODULES")");
+      return false;
+    }
 
 
-    if (supportCxx20FileSetTypes) {
-      if (type != "HEADERS"_s && type != "CXX_MODULES"_s) {
+    if (cmFileSetVisibilityIsForInterface(visibility) &&
+        !cmFileSetVisibilityIsForSelf(visibility) &&
+        !this->Target->IsImported()) {
+      if (type == "CXX_MODULES"_s) {
         this->SetError(
         this->SetError(
-          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) {
-          this->SetError(
-            R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)");
-          return false;
-        }
-      }
-    } else {
-      if (type != "HEADERS"_s) {
-        this->SetError("File set TYPE may only be \"HEADERS\"");
+          R"(File set TYPE "CXX_MODULES" may not have "INTERFACE" visibility)");
         return false;
         return false;
       }
       }
     }
     }

+ 0 - 2
Tests/RunCMake/CXXModules/CMakeLists.txt

@@ -1,6 +1,4 @@
 cmake_minimum_required(VERSION 3.23)
 cmake_minimum_required(VERSION 3.23)
 project(${RunCMake_TEST} NONE)
 project(${RunCMake_TEST} NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 include(${RunCMake_TEST}.cmake)
 include(${RunCMake_TEST}.cmake)

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at ExportBuildCxxModules.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at ExportInstallCxxModules.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/FileSetModulesInterface-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at FileSetModulesInterface.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 CMake Error at FileSetModulesInterface.cmake:[0-9]+ \(target_sources\):
 CMake Error at FileSetModulesInterface.cmake:[0-9]+ \(target_sources\):
   target_sources File set TYPE "CXX_MODULES" may not have "INTERFACE"
   target_sources File set TYPE "CXX_MODULES" may not have "INTERFACE"
   visibility
   visibility

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at FileSetModulesInterfaceImported.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at FileSetModulesPrivate.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at FileSetModulesPublic.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at InstallBMI.cmake:[0-9]+ \(install\):
-  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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at InstallBMIGenericArgs.cmake:[0-9]+ \(install\):
-  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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at InstallBMIIgnore.cmake:[0-9]+ \(install\):
-  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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at NinjaDependInfoBMIInstall.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at NinjaDependInfoExport.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

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

@@ -1,6 +0,0 @@
-CMake Warning \(dev\) at NinjaDependInfoFileSet.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/NoCXX-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at NoCXX.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 CMake Error in CMakeLists.txt:
 CMake Error in CMakeLists.txt:
   The target named "nocxx" has C\+\+ sources that export modules but the "CXX"
   The target named "nocxx" has C\+\+ sources that export modules but the "CXX"
   language has not been enabled
   language has not been enabled

+ 0 - 7
Tests/RunCMake/CXXModules/NoCXX20-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at NoCXX20.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 CMake Error in CMakeLists.txt:
 CMake Error in CMakeLists.txt:
   The target named "nocxx20" has C\+\+ sources that export modules but does not
   The target named "nocxx20" has C\+\+ sources that export modules but does not
   include "cxx_std_20" \(or newer\) among its `target_compile_features`; found
   include "cxx_std_20" \(or newer\) among its `target_compile_features`; found

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

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

+ 0 - 20
Tests/RunCMake/CXXModules/NoCXX20ModuleFlag-stderr.txt

@@ -1,20 +0,0 @@
-CMake Warning \(dev\) at NoCXX20ModuleFlag.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Error in CMakeLists.txt:
-  The target named "noexperimentalflag" has C\+\+ sources that export modules
-  but its experimental support has not been requested
-
-(
-CMake Error in CMakeLists.txt:
-(  The target named "noexperimentalflag" has C\+\+ sources that export modules
-  but its experimental support has not been requested
-|  The target named "noexperimentalflag" contains C\+\+ sources that export
-  modules which is not supported by the generator
-)
-)*
-CMake Generate step failed.  Build files cannot be regenerated correctly.

+ 0 - 14
Tests/RunCMake/CXXModules/NoCXX20ModuleFlag.cmake

@@ -1,14 +0,0 @@
-enable_language(CXX)
-
-set(CMAKE_EXPERIMENTAL_CXX_SCANDEP_SOURCE "echo")
-
-add_library(noexperimentalflag)
-target_sources(noexperimentalflag
-  PUBLIC
-    FILE_SET fs TYPE CXX_MODULES FILES
-      sources/module.cxx)
-target_compile_features(noexperimentalflag
-  PRIVATE
-    cxx_std_20)
-
-unset(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API)

+ 0 - 7
Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at NoDyndepSupport.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 (CMake Error:
 (CMake Error:
   The Ninja generator does not support C\+\+20 modules using Ninja version
   The Ninja generator does not support C\+\+20 modules using Ninja version
 
 

+ 0 - 7
Tests/RunCMake/CXXModules/NotCXXSourceModules-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at NotCXXSourceModules.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 CMake Error in CMakeLists.txt:
 CMake Error in CMakeLists.txt:
   Target "not-cxx-source" contains the source
   Target "not-cxx-source" contains the source
 
 

+ 0 - 7
Tests/RunCMake/CXXModules/NotCompiledSourceModules-stderr.txt

@@ -1,10 +1,3 @@
-CMake Warning \(dev\) at NotCompiledSourceModules.cmake:[0-9]+ \(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:[0-9]+ \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
 (CMake Error in CMakeLists.txt:
 (CMake Error in CMakeLists.txt:
   Target "not-cxx-source" has source file
   Target "not-cxx-source" has source file
 
 

+ 0 - 4
Tests/RunCMake/CXXModules/RunCMakeTest.cmake

@@ -14,10 +14,6 @@ if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
   if (NOT forced_cxx_standard)
   if (NOT forced_cxx_standard)
     run_cmake(NoCXX20)
     run_cmake(NoCXX20)
   endif ()
   endif ()
-
-  # This test uses C++20, but another prerequisite is missing, so forced
-  # standards don't matter.
-  run_cmake(NoCXX20ModuleFlag)
 endif ()
 endif ()
 
 
 if (RunCMake_GENERATOR MATCHES "Ninja")
 if (RunCMake_GENERATOR MATCHES "Ninja")

+ 0 - 4
Tests/RunCMake/CXXModules/examples/circular-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/cxx-modules-rules.cmake

@@ -1,5 +1,3 @@
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 if (NOT EXISTS "${CMake_TEST_MODULE_COMPILATION_RULES}")
 if (NOT EXISTS "${CMake_TEST_MODULE_COMPILATION_RULES}")
   message(FATAL_ERROR
   message(FATAL_ERROR
     "The `CMake_TEST_MODULE_COMPILATION_RULES` file must be specified "
     "The `CMake_TEST_MODULE_COMPILATION_RULES` file must be specified "

+ 0 - 4
Tests/RunCMake/CXXModules/examples/deep-chain-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/duplicate-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_bmi_and_interfaces REQUIRED)
 find_package(export_bmi_and_interfaces REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_bmi_and_interfaces)
 if (NOT TARGET CXXModules::export_bmi_and_interfaces)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_bmi_and_interfaces REQUIRED)
 find_package(export_bmi_and_interfaces REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_bmi_and_interfaces)
 if (NOT TARGET CXXModules::export_bmi_and_interfaces)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-compile-commands-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-include-directories-build-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9] \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-include-directories-install-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-interface-build-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9] \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_interfaces REQUIRED)
 find_package(export_interfaces REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_interfaces)
 if (NOT TARGET CXXModules::export_interfaces)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-interface-install-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_interfaces REQUIRED)
 find_package(export_interfaces REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_interfaces)
 if (NOT TARGET CXXModules::export_interfaces)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_interfaces_no_properties REQUIRED)
 find_package(export_interfaces_no_properties REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_interfaces_no_properties)
 if (NOT TARGET CXXModules::export_interfaces_no_properties)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_interfaces_no_properties REQUIRED)
 find_package(export_interfaces_no_properties REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_interfaces_no_properties)
 if (NOT TARGET CXXModules::export_interfaces_no_properties)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-usage-build-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_usage REQUIRED)
 find_package(export_usage REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_usage)
 if (NOT TARGET CXXModules::export_usage)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/export-usage-install-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 2
Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt

@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.24)
 cmake_minimum_required(VERSION 3.24)
 project(cxx_modules_library NONE)
 project(cxx_modules_library NONE)
 
 
-set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6")
-
 find_package(export_usage REQUIRED)
 find_package(export_usage REQUIRED)
 
 
 if (NOT TARGET CXXModules::export_usage)
 if (NOT TARGET CXXModules::export_usage)

+ 0 - 4
Tests/RunCMake/CXXModules/examples/generated-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-build-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build-build/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-bmi-and-interface-install-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install-install/lib/cmake/export_bmi_and_interfaces/export_bmi_and_interfaces-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-build-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-include-directories-build-build/export_include_directories-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-include-directories-install-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-include-directories-install-install/lib/cmake/export_include_directories/export_include_directories-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-interface-build-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-interface-build-build/export_interfaces-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-interface-install-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-interface-install-install/lib/cmake/export_interfaces/export_interfaces-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-build-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build-build/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 7
Tests/RunCMake/CXXModules/examples/import-modules-export-interface-no-properties-install-stderr.txt

@@ -1,7 +0,0 @@
-CMake Warning \(dev\) at .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-targets.cmake:[0-9]+ \(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\):
-  .*/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install-install/lib/cmake/export_interfaces_no_properties/export_interfaces_no_properties-config.cmake:[0-9]+ \(include\)
-  CMakeLists.txt:[0-9]+ \(find_package\)
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/install-bmi-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/internal-partitions-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/library-shared-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/library-static-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/object-library-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/partitions-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/public-req-private-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/same-src-name-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/scan_properties-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/simple-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(target_sources\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/try-compile-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_compile\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 0 - 4
Tests/RunCMake/CXXModules/examples/try-run-stderr.txt

@@ -1,4 +0,0 @@
-CMake Warning \(dev\) at CMakeLists.txt:[0-9]+ \(try_run\):
-  CMake's C\+\+ module support is experimental.  It is meant only for
-  experimentation and feedback to CMake developers.
-This warning is for project developers.  Use -Wno-dev to suppress it.

+ 34 - 0
Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json

@@ -51,6 +51,40 @@
                 }
                 }
             ]
             ]
         },
         },
+        {
+            "component": "Unspecified",
+            "type": "cxxModuleBmi",
+            "destination": "lib",
+            "paths": null,
+            "isExcludeFromAll": null,
+            "isForAllComponents": null,
+            "isOptional": null,
+            "targetId": null,
+            "targetIndex": null,
+            "cxxModuleBmiTarget": {
+                "id": "^cxx_exe::@a56b12a3f5c0529fb296",
+                "index": "cxx_exe"
+            },
+            "targetIsImportLibrary": null,
+            "targetInstallNamelink": null,
+            "exportName": null,
+            "exportTargets": null,
+            "scriptFile": null,
+            "backtrace": [
+                {
+                    "file": "^cxx/CMakeLists\\.txt$",
+                    "line": 38,
+                    "command": "install",
+                    "hasParent": true
+                },
+                {
+                    "file": "^cxx/CMakeLists\\.txt$",
+                    "line": null,
+                    "command": null,
+                    "hasParent": false
+                }
+            ]
+        },
         {
         {
             "component": "Unspecified",
             "component": "Unspecified",
             "type": "runtimeDependencySet",
             "type": "runtimeDependencySet",

+ 68 - 0
Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json

@@ -47,6 +47,40 @@
                 }
                 }
             ]
             ]
         },
         },
+        {
+            "component": "Unspecified",
+            "type": "cxxModuleBmi",
+            "destination": "bin",
+            "paths": null,
+            "isExcludeFromAll": null,
+            "isForAllComponents": null,
+            "isOptional": null,
+            "targetId": null,
+            "targetIndex": null,
+            "cxxModuleBmiTarget": {
+                "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
+                "index": "c_object_exe"
+            },
+            "targetIsImportLibrary": null,
+            "targetInstallNamelink": null,
+            "exportName": null,
+            "exportTargets": null,
+            "scriptFile": null,
+            "backtrace": [
+                {
+                    "file": "^object/CMakeLists\\.txt$",
+                    "line": 13,
+                    "command": "install",
+                    "hasParent": true
+                },
+                {
+                    "file": "^object/CMakeLists\\.txt$",
+                    "line": null,
+                    "command": null,
+                    "hasParent": false
+                }
+            ]
+        },
         {
         {
             "component": "Unspecified",
             "component": "Unspecified",
             "type": "target",
             "type": "target",
@@ -78,6 +112,40 @@
                     "hasParent": false
                     "hasParent": false
                 }
                 }
             ]
             ]
+        },
+        {
+            "component": "Unspecified",
+            "type": "cxxModuleBmi",
+            "destination": "bin",
+            "paths": null,
+            "isExcludeFromAll": null,
+            "isForAllComponents": null,
+            "isOptional": null,
+            "targetId": null,
+            "targetIndex": null,
+            "cxxModuleBmiTarget": {
+                "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+                "index": "cxx_object_exe"
+            },
+            "targetIsImportLibrary": null,
+            "targetInstallNamelink": null,
+            "exportName": null,
+            "exportTargets": null,
+            "scriptFile": null,
+            "backtrace": [
+                {
+                    "file": "^object/CMakeLists\\.txt$",
+                    "line": 13,
+                    "command": "install",
+                    "hasParent": true
+                },
+                {
+                    "file": "^object/CMakeLists\\.txt$",
+                    "line": null,
+                    "command": null,
+                    "hasParent": false
+                }
+            ]
         }
         }
     ]
     ]
 }
 }

+ 1 - 1
Tests/RunCMake/target_sources/FileSetDefaultWrongType-stderr.txt

@@ -1,4 +1,4 @@
 ^CMake Error at FileSetDefaultWrongType\.cmake:[0-9]+ \(target_sources\):
 ^CMake Error at FileSetDefaultWrongType\.cmake:[0-9]+ \(target_sources\):
-  target_sources File set TYPE may only be "HEADERS"
+  target_sources File set TYPE may only be "HEADERS" or "CXX_MODULES"
 Call Stack \(most recent call first\):
 Call Stack \(most recent call first\):
   CMakeLists\.txt:[0-9]+ \(include\)$
   CMakeLists\.txt:[0-9]+ \(include\)$

Some files were not shown because too many files changed in this diff