diff options
author | Brad King <brad.king@kitware.com> | 2014-04-01 15:06:12 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-01 15:06:12 (GMT) |
commit | ce9ffd6b23155588a2f8be880afd0fc7654808af (patch) | |
tree | 1b9dae11a0a96c004887d7ef4a7659a3ed11545d /Modules/CheckIncludeFiles.cmake | |
parent | 8617de566f637935793dc2c7bcf004a3b311c31e (diff) | |
parent | 83934757c942672d8bea79f11e51a184b168a212 (diff) | |
download | CMake-ce9ffd6b23155588a2f8be880afd0fc7654808af.zip CMake-ce9ffd6b23155588a2f8be880afd0fc7654808af.tar.gz CMake-ce9ffd6b23155588a2f8be880afd0fc7654808af.tar.bz2 |
Merge topic 'find_package-check-quiet'
83934757 Find*: Make find_package(.. QUIET) affect Check* modules.
4c0cc9ab Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.
Diffstat (limited to 'Modules/CheckIncludeFiles.cmake')
-rw-r--r-- | Modules/CheckIncludeFiles.cmake | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 182067f..6aa0f2b 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -23,6 +23,7 @@ # CMAKE_REQUIRED_FLAGS = string of compile command line flags # CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) # CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_QUIET = execute quietly without messages #============================================================================= # Copyright 2003-2012 Kitware, Inc. @@ -66,7 +67,9 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) set(_description "include file ${_INCLUDE}") endif() - message(STATUS "Looking for ${_description}") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${_description}") + endif() try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c @@ -76,14 +79,18 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) "${CHECK_INCLUDE_FILES_INCLUDE_DIRS}" OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) - message(STATUS "Looking for ${_description} - found") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${_description} - found") + endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if files ${INCLUDE} " "exist passed with the following output:\n" "${OUTPUT}\n\n") else() - message(STATUS "Looking for ${_description} - not found") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Looking for ${_description} - not found") + endif() set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if files ${INCLUDE} " |