Merge topic 'fix-CMAKE_COMPILER_IS_GNU-confusion'

152bbe50 Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable
a6d3f541 Help: Clarify documentation of CMAKE_COMPILER_IS_GNU{CC,CXX,G77}
This commit is contained in:
Brad King 2016-09-15 08:46:30 -04:00 committed by CMake Topic Stage
commit 0b282335ab
7 changed files with 20 additions and 18 deletions

View File

@ -64,7 +64,7 @@ endif()
# Workaround for short jump tables on PA-RISC
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
if(CMAKE_COMPILER_IS_GNUC)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-calls")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -208,7 +208,7 @@ macro(_test_compiler_hidden_visibility)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2")
set(GCC_TOO_OLD TRUE)
elseif(CMAKE_COMPILER_IS_GNUC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2")
elseif(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2")
set(GCC_TOO_OLD TRUE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")
set(_INTEL_TOO_OLD TRUE)