Explorar el Código

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 <[email protected]>
Brad King hace 10 años
padre
commit
f3ac06519f
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      Modules/CMakeTestCompilerCommon.cmake

+ 1 - 5
Modules/CMakeTestCompilerCommon.cmake

@@ -13,9 +13,5 @@
 #  License text for the above reference.)
 #  License text for the above reference.)
 
 
 function(PrintTestCompilerStatus LANG MSG)
 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()
+  message(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
 endfunction()
 endfunction()