summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIncludeFiles.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-03-30 02:12:27 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2014-03-30 02:14:23 (GMT)
commit4c0cc9ab9195d348ea5f1b004789ec334531bbb1 (patch)
tree8265de61b683bf0f6fa89dae3026f4b4b5159388 /Modules/CheckIncludeFiles.cmake
parentede0419a376cd3ddc26058f910318c76e0077bb1 (diff)
downloadCMake-4c0cc9ab9195d348ea5f1b004789ec334531bbb1.zip
CMake-4c0cc9ab9195d348ea5f1b004789ec334531bbb1.tar.gz
CMake-4c0cc9ab9195d348ea5f1b004789ec334531bbb1.tar.bz2
Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.
Setting this flag can silence messages from the Check*.cmake modules. This can be used by Find*.cmake modules when they are in silent mode.
Diffstat (limited to 'Modules/CheckIncludeFiles.cmake')
-rw-r--r--Modules/CheckIncludeFiles.cmake13
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} "