MantisBT - CMake
View Issue Details
0014813CMakeCMakepublic2014-03-18 04:542014-10-06 10:33
Michał Cichoń 
Clinton Stimpson 
normalminoralways
closedfixed 
PCWindows7 x64
 
 
0014813: find_package(Qt4 4.6.2 QUIET) isn't really quiet
find_package(Qt4 4.6.2 QUIET) is poluting output with messages even if it is ask to be quiet.
No tags attached.
related to 0014812closed Clinton Stimpson find_package(OpenMP QUIET) isn't really quiet 
Issue History
2014-03-18 04:54Michał CichońNew Issue
2014-03-18 08:40Brad KingAssigned To => Clinton Stimpson
2014-03-18 08:40Brad KingStatusnew => assigned
2014-03-18 08:51Michał CichońNote Added: 0035427
2014-03-18 11:51Brad KingRelationship addedrelated to 0014812
2014-03-28 00:21Clinton StimpsonNote Added: 0035544
2014-03-28 03:34Stephen KellyNote Added: 0035547
2014-03-28 08:43Clinton StimpsonNote Added: 0035551
2014-03-28 08:51Clinton StimpsonNote Added: 0035552
2014-03-28 11:48Stephen KellyNote Added: 0035554
2014-03-28 15:04Clinton StimpsonNote Added: 0035559
2014-03-31 09:18Clinton StimpsonNote Added: 0035567
2014-03-31 09:18Clinton StimpsonStatusassigned => resolved
2014-03-31 09:18Clinton StimpsonResolutionopen => fixed
2014-10-06 10:33Robert MaynardNote Added: 0036960
2014-10-06 10:33Robert MaynardStatusresolved => closed

Notes
(0035427)
Michał Cichoń   
2014-03-18 08:51   
Forgot to attach printed messages:
Looking for Q_WS_X11
Looking for Q_WS_X11 - not found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - found
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found
(0035544)
Clinton Stimpson   
2014-03-28 00:21   
Brad, can you do a review on the stage/find_package-check-quiet topic which fixes this and bug 0014812?
(0035547)
Stephen Kelly   
2014-03-28 03:34   
Clinton, in your patch, does the CMAKE_REQUIRED_QUIET setting from Find modules leak out?
(0035551)
Clinton Stimpson   
2014-03-28 08:43   
It does not. To check that I did

find_package(Qt4 QUIET)
unset(Q_WS_MAC CACHE)
unset(Q_WS_X11 CACHE)
unset(Q_WS_WIN CACHE)
find_package(Qt4)

And for the 2nd find package, I got the verbose output again.
(0035552)
Clinton Stimpson   
2014-03-28 08:51   
Oh, but wait... it does leak out.

unset(Q_WS_MAC CACHE)
find_package(Qt4 4.6 QUIET)

unset(Q_WS_MAC CACHE)
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)

The check_cxx_symbol_exists() was quiet when it should not have been.
Thanks for checking.
(0035554)
Stephen Kelly   
2014-03-28 11:48   
I see you updated the topic to use CMakePushCheckState.

Wouldn't it be less code, and require fewer includes to simply unset the variable after use?
(0035559)
Clinton Stimpson   
2014-03-28 15:04   
Yes, it would be less code.

But I wasn't sure I could assume that the caller never sets the CHECK_REQUIRED_* variables to affect the behavior of all these check modules.
(0035567)
Clinton Stimpson   
2014-03-31 09:18   
http://cmake.org/gitweb?p=cmake.git;a=commit;h=83934757 [^]
(0036960)
Robert Maynard   
2014-10-06 10:33   
Closing resolved issues that have not been updated in more than 4 months.