diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2014-03-30 02:22:54 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2014-03-30 02:22:54 (GMT) |
commit | 83934757c942672d8bea79f11e51a184b168a212 (patch) | |
tree | dd6d3dc88daeb1a8ba07e1feb8d324667bb4c789 /Modules/FindOpenMP.cmake | |
parent | 4c0cc9ab9195d348ea5f1b004789ec334531bbb1 (diff) | |
download | CMake-83934757c942672d8bea79f11e51a184b168a212.zip CMake-83934757c942672d8bea79f11e51a184b168a212.tar.gz CMake-83934757c942672d8bea79f11e51a184b168a212.tar.bz2 |
Find*: Make find_package(.. QUIET) affect Check* modules.
Fixes issues #14812 and #14813 where find_package(OpenMP QUIET) and
find_package(Qt4 QUIET) would still print out messages when calling
check*() functions.
Also a partial fix for #14445 where building CMake
(without cmake-gui) when Qt5 is installed and Qt4 is not installed
and warnings come out of FindQt4.cmake.
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r-- | Modules/FindOpenMP.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index fead4a6..30972ae 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -39,6 +39,8 @@ # License text for the above reference.) set(_OPENMP_REQUIRED_VARS) +set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) +set(CMAKE_REQUIRED_QUIET ${OpenMP_FIND_QUIETLY}) function(_OPENMP_FLAG_CANDIDATES LANG) set(OpenMP_FLAG_CANDIDATES @@ -116,7 +118,9 @@ if(CMAKE_C_COMPILER_LOADED) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) - message(STATUS "Try OpenMP C flag = [${FLAG}]") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Try OpenMP C flag = [${FLAG}]") + endif() check_c_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED) set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") if(OpenMP_FLAG_DETECTED) @@ -150,7 +154,9 @@ if(CMAKE_CXX_COMPILER_LOADED) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) - message(STATUS "Try OpenMP CXX flag = [${FLAG}]") + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Try OpenMP CXX flag = [${FLAG}]") + endif() check_cxx_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED) set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") if(OpenMP_FLAG_DETECTED) @@ -167,6 +173,8 @@ if(CMAKE_CXX_COMPILER_LOADED) unset(OpenMP_CXX_TEST_SOURCE) endif() +set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) + if(_OPENMP_REQUIRED_VARS) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) |