Browse Source

Merge topic 'deprecate-extra-generators'

ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !8211
Brad King 2 years ago
parent
commit
51c7917072

+ 6 - 0
Help/generator/CodeBlocks.rst

@@ -1,6 +1,12 @@
 CodeBlocks
 CodeBlocks
 ----------
 ----------
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Generates CodeBlocks project files.
 Generates CodeBlocks project files.
 
 
 Project files for CodeBlocks will be created in the top directory and
 Project files for CodeBlocks will be created in the top directory and

+ 6 - 0
Help/generator/CodeLite.rst

@@ -1,6 +1,12 @@
 CodeLite
 CodeLite
 ----------
 ----------
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Generates CodeLite project files.
 Generates CodeLite project files.
 
 
 Project files for CodeLite will be created in the top directory and
 Project files for CodeLite will be created in the top directory and

+ 6 - 0
Help/generator/Eclipse CDT4.rst

@@ -1,6 +1,12 @@
 Eclipse CDT4
 Eclipse CDT4
 ------------
 ------------
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Generates Eclipse CDT 4.0 project files.
 Generates Eclipse CDT 4.0 project files.
 
 
 Project files for Eclipse will be created in the top directory.  In
 Project files for Eclipse will be created in the top directory.  In

+ 6 - 0
Help/generator/Kate.rst

@@ -1,6 +1,12 @@
 Kate
 Kate
 ----
 ----
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Generates Kate project files.
 Generates Kate project files.
 
 
 A project file for Kate will be created in the top directory in the top level
 A project file for Kate will be created in the top directory in the top level

+ 6 - 0
Help/generator/Sublime Text 2.rst

@@ -1,6 +1,12 @@
 Sublime Text 2
 Sublime Text 2
 --------------
 --------------
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Generates Sublime Text 2 project files.
 Generates Sublime Text 2 project files.
 
 
 Project files for Sublime Text 2 will be created in the top directory
 Project files for Sublime Text 2 will be created in the top directory

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

@@ -107,6 +107,12 @@ Other Generators
 Extra Generators
 Extra Generators
 ================
 ================
 
 
+.. deprecated:: 3.27
+
+  Support for "Extra Generators" is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
 Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
 command-line tool :option:`--help <cmake --help>` output may have
 command-line tool :option:`--help <cmake --help>` output may have
 variants that specify an extra generator for an auxiliary IDE tool.
 variants that specify an extra generator for an auxiliary IDE tool.

+ 1 - 1
Help/manual/cmake.1.rst

@@ -781,7 +781,7 @@ Available commands are:
       (:option:`-A ... <cmake -A>`).  The value is a list of platforms known to
       (:option:`-A ... <cmake -A>`).  The value is a list of platforms known to
       be supported.
       be supported.
     ``extraGenerators``
     ``extraGenerators``
-      A list of strings with all the extra generators compatible with
+      A list of strings with all the :ref:`Extra Generators` compatible with
       the generator.
       the generator.
 
 
   ``fileApi``
   ``fileApi``

+ 5 - 0
Help/release/dev/deprecate-extra-generators.rst

@@ -0,0 +1,5 @@
+deprecate-extra-generators
+--------------------------
+
+* The :ref:`Extra Generators` have been deprecated.  IDEs may use the
+  :manual:`cmake-file-api(7)` to view CMake-generated project build trees.

+ 2 - 1
Help/variable/CMAKE_EDIT_COMMAND.rst

@@ -2,7 +2,8 @@ CMAKE_EDIT_COMMAND
 ------------------
 ------------------
 
 
 Full path to :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.  Defined only for
 Full path to :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.  Defined only for
-:ref:`Makefile Generators` when not using an "extra" generator for an IDE.
+:ref:`Makefile Generators` and :ref:`Ninja Generators` when not using any
+:ref:`Extra Generators`.
 
 
 This is the full path to the CMake executable that can graphically
 This is the full path to the CMake executable that can graphically
 edit the cache.  For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.
 edit the cache.  For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.

+ 6 - 0
Help/variable/CMAKE_EXTRA_GENERATOR.rst

@@ -1,6 +1,12 @@
 CMAKE_EXTRA_GENERATOR
 CMAKE_EXTRA_GENERATOR
 ---------------------
 ---------------------
 
 
+.. deprecated:: 3.27
+
+  Support for :ref:`Extra Generators` is deprecated and will be removed from
+  a future version of CMake.  IDEs may use the :manual:`cmake-file-api(7)`
+  to view CMake-generated project build trees.
+
 The extra generator used to build the project.  See
 The extra generator used to build the project.  See
 :manual:`cmake-generators(7)`.
 :manual:`cmake-generators(7)`.
 
 

+ 1 - 1
Source/cmExtraCodeBlocksGenerator.cxx

@@ -45,7 +45,7 @@ cmExtraCodeBlocksGenerator::GetFactory()
 {
 {
   static cmExternalMakefileProjectGeneratorSimpleFactory<
   static cmExternalMakefileProjectGeneratorSimpleFactory<
     cmExtraCodeBlocksGenerator>
     cmExtraCodeBlocksGenerator>
-    factory("CodeBlocks", "Generates CodeBlocks project files.");
+    factory("CodeBlocks", "Generates CodeBlocks project files (deprecated).");
 
 
   if (factory.GetSupportedGlobalGenerators().empty()) {
   if (factory.GetSupportedGlobalGenerators().empty()) {
 #if defined(_WIN32)
 #if defined(_WIN32)

+ 1 - 1
Source/cmExtraCodeLiteGenerator.cxx

@@ -33,7 +33,7 @@ cmExtraCodeLiteGenerator::GetFactory()
 {
 {
   static cmExternalMakefileProjectGeneratorSimpleFactory<
   static cmExternalMakefileProjectGeneratorSimpleFactory<
     cmExtraCodeLiteGenerator>
     cmExtraCodeLiteGenerator>
-    factory("CodeLite", "Generates CodeLite project files.");
+    factory("CodeLite", "Generates CodeLite project files (deprecated).");
 
 
   if (factory.GetSupportedGlobalGenerators().empty()) {
   if (factory.GetSupportedGlobalGenerators().empty()) {
 #if defined(_WIN32)
 #if defined(_WIN32)

+ 2 - 1
Source/cmExtraEclipseCDT4Generator.cxx

@@ -63,7 +63,8 @@ cmExtraEclipseCDT4Generator::GetFactory()
 {
 {
   static cmExternalMakefileProjectGeneratorSimpleFactory<
   static cmExternalMakefileProjectGeneratorSimpleFactory<
     cmExtraEclipseCDT4Generator>
     cmExtraEclipseCDT4Generator>
-    factory("Eclipse CDT4", "Generates Eclipse CDT 4.0 project files.");
+    factory("Eclipse CDT4",
+            "Generates Eclipse CDT 4.0 project files (deprecated).");
 
 
   if (factory.GetSupportedGlobalGenerators().empty()) {
   if (factory.GetSupportedGlobalGenerators().empty()) {
 // TODO: Verify if __CYGWIN__ should be checked.
 // TODO: Verify if __CYGWIN__ should be checked.

+ 1 - 1
Source/cmExtraKateGenerator.cxx

@@ -25,7 +25,7 @@ cmExtraKateGenerator::cmExtraKateGenerator() = default;
 cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
 cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
 {
 {
   static cmExternalMakefileProjectGeneratorSimpleFactory<cmExtraKateGenerator>
   static cmExternalMakefileProjectGeneratorSimpleFactory<cmExtraKateGenerator>
-    factory("Kate", "Generates Kate project files.");
+    factory("Kate", "Generates Kate project files (deprecated).");
 
 
   if (factory.GetSupportedGlobalGenerators().empty()) {
   if (factory.GetSupportedGlobalGenerators().empty()) {
 #if defined(_WIN32)
 #if defined(_WIN32)

+ 2 - 1
Source/cmExtraSublimeTextGenerator.cxx

@@ -43,7 +43,8 @@ cmExtraSublimeTextGenerator::GetFactory()
 {
 {
   static cmExternalMakefileProjectGeneratorSimpleFactory<
   static cmExternalMakefileProjectGeneratorSimpleFactory<
     cmExtraSublimeTextGenerator>
     cmExtraSublimeTextGenerator>
-    factory("Sublime Text 2", "Generates Sublime Text 2 project files.");
+    factory("Sublime Text 2",
+            "Generates Sublime Text 2 project files (deprecated).");
 
 
   if (factory.GetSupportedGlobalGenerators().empty()) {
   if (factory.GetSupportedGlobalGenerators().empty()) {
 #if defined(_WIN32)
 #if defined(_WIN32)

+ 10 - 0
Source/cmGlobalGenerator.cxx

@@ -1327,6 +1327,16 @@ void cmGlobalGenerator::Configure()
   this->BinaryDirectories.insert(
   this->BinaryDirectories.insert(
     this->CMakeInstance->GetHomeOutputDirectory());
     this->CMakeInstance->GetHomeOutputDirectory());
 
 
+  if (this->ExtraGenerator && !this->CMakeInstance->GetIsInTryCompile()) {
+    this->CMakeInstance->IssueMessage(
+      MessageType::DEPRECATION_WARNING,
+      cmStrCat("Support for \"Extra Generators\" like\n  ",
+               this->ExtraGenerator->GetName(),
+               "\nis deprecated and will be removed from a future version "
+               "of CMake.  IDEs may use the cmake-file-api(7) to view "
+               "CMake-generated project build trees."));
+  }
+
   // now do it
   // now do it
   this->ConfigureDoneCMP0026AndCMP0024 = false;
   this->ConfigureDoneCMP0026AndCMP0024 = false;
   dirMf->Configure();
   dirMf->Configure();

+ 8 - 0
Tests/RunCMake/ExtraGenerators/Simple-stderr.txt

@@ -0,0 +1,8 @@
+^CMake Deprecation Warning:
+  Support for "Extra Generators" like
+
+    [^
+]+
+
+  is deprecated and will be removed from a future version of CMake\.  IDEs may
+  use the cmake-file-api\(7\) to view CMake-generated project build trees\.