Improve compiler check message on non-Make generators

When we check for a working compiler we print a message of the form:

    Check for working <LANG> compiler: ...

At one time CMAKE_<LANG>_COMPILER was not well-defined for all
generators so we printed the generator name instead of the path to
the compiler.  Nowadays we always know the compiler, so update the
message to print it unconditionally.  This is more informative than
the generator name, especially when a toolset (cmake -T) is used.

Suggested-by: Gregor Jasny <gjasny@googlemail.com>
This commit is contained in:
Brad King 2016-02-25 08:25:35 -05:00
parent 9b6fdbfb92
commit f3ac06519f
1 changed files with 1 additions and 5 deletions

View File

@ -13,9 +13,5 @@
# License text for the above reference.)
function(PrintTestCompilerStatus LANG MSG)
if(CMAKE_GENERATOR MATCHES Make)
message(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
else()
message(STATUS "Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG}")
endif()
endfunction()