瀏覽代碼

Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77}

Closes: #16308
Brad King 9 年之前
父節點
當前提交
a6d3f5418c

+ 3 - 1
Help/manual/cmake-variables.7.rst

@@ -332,7 +332,9 @@ Variables for Languages
 .. toctree::
    :maxdepth: 1
 
-   /variable/CMAKE_COMPILER_IS_GNULANG
+   /variable/CMAKE_COMPILER_IS_GNUCC
+   /variable/CMAKE_COMPILER_IS_GNUCXX
+   /variable/CMAKE_COMPILER_IS_GNUG77
    /variable/CMAKE_C_COMPILE_FEATURES
    /variable/CMAKE_C_EXTENSIONS
    /variable/CMAKE_C_STANDARD

+ 5 - 0
Help/variable/CMAKE_COMPILER_IS_GNUCC.rst

@@ -0,0 +1,5 @@
+CMAKE_COMPILER_IS_GNUCC
+-----------------------
+
+True if the ``C`` compiler is GNU.
+Use :variable:`CMAKE_C_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` instead.

+ 5 - 0
Help/variable/CMAKE_COMPILER_IS_GNUCXX.rst

@@ -0,0 +1,5 @@
+CMAKE_COMPILER_IS_GNUCXX
+------------------------
+
+True if the C++ (``CXX``) compiler is GNU.
+Use :variable:`CMAKE_CXX_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` instead.

+ 5 - 0
Help/variable/CMAKE_COMPILER_IS_GNUG77.rst

@@ -0,0 +1,5 @@
+CMAKE_COMPILER_IS_GNUG77
+------------------------
+
+True if the ``Fortran`` compiler is GNU.
+Use :variable:`CMAKE_Fortran_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` instead.

+ 0 - 15
Help/variable/CMAKE_COMPILER_IS_GNULANG.rst

@@ -1,15 +0,0 @@
-CMAKE_COMPILER_IS_GNU<LANG>
----------------------------
-
-True if the compiler is GNU.
-
-If the selected ``<LANG>`` compiler is the GNU compiler then this is ``TRUE``,
-if not it is ``FALSE``.  Unlike the other per-language variables, this
-uses the GNU syntax for identifying languages instead of the CMake
-syntax.  Recognized values of the ``<LANG>`` suffix are:
-
-::
-
-  CC = C compiler
-  CXX = C++ compiler
-  G77 = Fortran compiler