mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
The `CMAKE_COMPILER_IS_*` variables have been documented as deprecated since CMake 3.24, without emitting warnings. This commit updates their documentation to help users safely migrate to `CMAKE_<LANG>_COMPILER_ID` variables. Also a RST deprecation directive is added to clarify their status.
36 lines
909 B
ReStructuredText
36 lines
909 B
ReStructuredText
CMAKE_COMPILER_IS_GNUG77
|
|
------------------------
|
|
|
|
.. deprecated:: 3.24
|
|
|
|
Use the :variable:`CMAKE_Fortran_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>`
|
|
variable instead.
|
|
|
|
The ``CMAKE_COMPILER_IS_*`` variables were used in early CMake versions before
|
|
the introduction of :variable:`CMAKE_<LANG>_COMPILER_ID` variables in CMake
|
|
2.6.
|
|
|
|
The ``CMAKE_COMPILER_IS_GNUG77`` variable is set to boolean true if the
|
|
``Fortran`` compiler is GNU.
|
|
|
|
Examples
|
|
^^^^^^^^
|
|
|
|
In earlier versions of CMake, the ``CMAKE_COMPILER_IS_GNUG77`` variable was used
|
|
to check if the ``Fortran`` compiler was GNU:
|
|
|
|
.. code-block:: cmake
|
|
|
|
if(CMAKE_COMPILER_IS_GNUG77)
|
|
# GNU Fortran compiler-specific logic.
|
|
endif()
|
|
|
|
Starting with CMake 2.6, the ``CMAKE_Fortran_COMPILER_ID`` variable should be
|
|
used instead:
|
|
|
|
.. code-block:: cmake
|
|
|
|
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
|
# GNU Fortran compiler-specific logic.
|
|
endif()
|