diff options
Diffstat (limited to 'Modules/CheckFunctionExists.cmake')
-rw-r--r-- | Modules/CheckFunctionExists.cmake | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index e232bd7..bfd1836 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -20,6 +20,7 @@ # CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) # CMAKE_REQUIRED_INCLUDES = list of include directories # CMAKE_REQUIRED_LIBRARIES = list of libraries to link +# CMAKE_REQUIRED_QUIET = execute quietly without messages #============================================================================= # Copyright 2002-2011 Kitware, Inc. @@ -40,7 +41,9 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) if("${VARIABLE}" MATCHES "^${VARIABLE}$") set(MACRO_CHECK_FUNCTION_DEFINITIONS "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") - message(STATUS "Looking for ${FUNCTION}") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${FUNCTION}") + endif() if(CMAKE_REQUIRED_LIBRARIES) set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) @@ -63,12 +66,16 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}") - message(STATUS "Looking for ${FUNCTION} - found") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${FUNCTION} - found") + endif() file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the function ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n") else() - message(STATUS "Looking for ${FUNCTION} - not found") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${FUNCTION} - not found") + endif() set(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the function ${FUNCTION} exists failed with the following output:\n" |