Review Request 112151: Use components in FindXCB

Stephen Kelly steveire at gmail.com
Tue Sep 3 14:37:12 UTC 2013



> On Sept. 3, 2013, 9:40 a.m., Stephen Kelly wrote:
> > find-modules/FindXCB.cmake, line 187
> > <http://git.reviewboard.kde.org/r/112151/diff/2/?file=186650#file186650line187>
> >
> >     Is it even possible to hit these fatal errors? I thought find_path and find_library would always set the variable to either the result or Foo-NOTFOUND ?
> >     
> >     find_path(XCB_wtf_INCLUDE_DIR NAMES xcb/wtf)
> >     if (NOT DEFINED XCB_wtf_INCLUDE_DIR)
> >       message("NOT DEFINED")
> >     endif()
> >     if (NOT XCB_wtf_INCLUDE_DIR)
> >       message("NOT TRUE: ${XCB_wtf_INCLUDE_DIR}")
> >     endif()
> >     return()
> >     
> >     prints 
> >     
> >      NOT TRUE: XCB_wtf_INCLUDE_DIR-NOTFOUND
> >     
> >     as I expect...
> 
> Martin Gräßlin wrote:
>     what do you suggest as a replacement? Please note that I got inspiration for this code from FindKF5.cmake, so it might be that it's not correct there as well.

I suggest removing the NOT DEFINED checks and FATAL_ERROR messages without adding a replacement. It is dead, unreachable code.


- Stephen


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112151/#review39244
-----------------------------------------------------------


On Sept. 3, 2013, 7:37 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112151/
> -----------------------------------------------------------
> 
> (Updated Sept. 3, 2013, 7:37 a.m.)
> 
> 
> Review request for KDE Frameworks, Alexander Neundorf and Stephen Kelly.
> 
> 
> Description
> -------
> 
> Instead of finding all or nothing from XCB it becomes components aware. So a user can just specify which XCB components it needs and compilation doesn't fail if a not-needed unrelated component is not found. It also allows to have some components as required and some as optional.
> 
> 
> Diffs
> -----
> 
>   find-modules/FindXCB.cmake 7e7e701 
> 
> Diff: http://git.reviewboard.kde.org/r/112151/diff/
> 
> 
> Testing
> -------
> 
> tested in kde-workspace
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130903/6429fa06/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list