Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide support for users of specific IDEs by directly generating their project files alongside make or ninja files. Nowadays the file-api provides a more generic, maintainable, well-tested, and robust way for IDEs to view CMake project build trees. Deprecate the legacy "extra" generators to encourage the corresponding IDEs to use the file-api. Fixes: #19090
This commit is contained in:
parent
37f068083b
commit
ef5a4d964b
@ -1,6 +1,12 @@
|
||||
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.
|
||||
|
||||
Project files for CodeBlocks will be created in the top directory and
|
||||
|
@ -1,6 +1,12 @@
|
||||
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.
|
||||
|
||||
Project files for CodeLite will be created in the top directory and
|
||||
|
@ -1,6 +1,12 @@
|
||||
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.
|
||||
|
||||
Project files for Eclipse will be created in the top directory. In
|
||||
|
@ -1,6 +1,12 @@
|
||||
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.
|
||||
|
||||
A project file for Kate will be created in the top directory in the top level
|
||||
|
@ -1,6 +1,12 @@
|
||||
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.
|
||||
|
||||
Project files for Sublime Text 2 will be created in the top directory
|
||||
|
@ -107,6 +107,12 @@ Other 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)`
|
||||
command-line tool :option:`--help <cmake --help>` output may have
|
||||
variants that specify an extra generator for an auxiliary IDE tool.
|
||||
|
@ -781,7 +781,7 @@ Available commands are:
|
||||
(:option:`-A ... <cmake -A>`). The value is a list of platforms known to
|
||||
be supported.
|
||||
``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.
|
||||
|
||||
``fileApi``
|
||||
|
5
Help/release/dev/deprecate-extra-generators.rst
Normal file
5
Help/release/dev/deprecate-extra-generators.rst
Normal file
@ -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,7 +2,8 @@ CMAKE_EDIT_COMMAND
|
||||
------------------
|
||||
|
||||
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
|
||||
edit the cache. For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.
|
||||
|
@ -1,6 +1,12 @@
|
||||
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
|
||||
:manual:`cmake-generators(7)`.
|
||||
|
||||
|
@ -45,7 +45,7 @@ cmExtraCodeBlocksGenerator::GetFactory()
|
||||
{
|
||||
static cmExternalMakefileProjectGeneratorSimpleFactory<
|
||||
cmExtraCodeBlocksGenerator>
|
||||
factory("CodeBlocks", "Generates CodeBlocks project files.");
|
||||
factory("CodeBlocks", "Generates CodeBlocks project files (deprecated).");
|
||||
|
||||
if (factory.GetSupportedGlobalGenerators().empty()) {
|
||||
#if defined(_WIN32)
|
||||
|
@ -33,7 +33,7 @@ cmExtraCodeLiteGenerator::GetFactory()
|
||||
{
|
||||
static cmExternalMakefileProjectGeneratorSimpleFactory<
|
||||
cmExtraCodeLiteGenerator>
|
||||
factory("CodeLite", "Generates CodeLite project files.");
|
||||
factory("CodeLite", "Generates CodeLite project files (deprecated).");
|
||||
|
||||
if (factory.GetSupportedGlobalGenerators().empty()) {
|
||||
#if defined(_WIN32)
|
||||
|
@ -63,7 +63,8 @@ cmExtraEclipseCDT4Generator::GetFactory()
|
||||
{
|
||||
static cmExternalMakefileProjectGeneratorSimpleFactory<
|
||||
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()) {
|
||||
// TODO: Verify if __CYGWIN__ should be checked.
|
||||
|
@ -25,7 +25,7 @@ cmExtraKateGenerator::cmExtraKateGenerator() = default;
|
||||
cmExternalMakefileProjectGeneratorFactory* cmExtraKateGenerator::GetFactory()
|
||||
{
|
||||
static cmExternalMakefileProjectGeneratorSimpleFactory<cmExtraKateGenerator>
|
||||
factory("Kate", "Generates Kate project files.");
|
||||
factory("Kate", "Generates Kate project files (deprecated).");
|
||||
|
||||
if (factory.GetSupportedGlobalGenerators().empty()) {
|
||||
#if defined(_WIN32)
|
||||
|
@ -43,7 +43,8 @@ cmExtraSublimeTextGenerator::GetFactory()
|
||||
{
|
||||
static cmExternalMakefileProjectGeneratorSimpleFactory<
|
||||
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 defined(_WIN32)
|
||||
|
@ -1327,6 +1327,16 @@ void cmGlobalGenerator::Configure()
|
||||
this->BinaryDirectories.insert(
|
||||
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
|
||||
this->ConfigureDoneCMP0026AndCMP0024 = false;
|
||||
dirMf->Configure();
|
||||
|
8
Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
Normal file
8
Tests/RunCMake/ExtraGenerators/Simple-stderr.txt
Normal file
@ -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\.
|
Loading…
Reference in New Issue
Block a user