[cmake-developers] Adding argument "OPTIONAL" to find_package() and add_subdirectory

Alexander Neundorf neundorf at kde.org
Thu Jun 9 02:47:11 EDT 2011


On Thursday 09 June 2011, Nicolas Desprès wrote:
> On Wed, Jun 8, 2011 at 8:08 PM, Alexander Neundorf <neundorf at kde.org> wrote:
...
> > I can't think of any reason why somebody would want to use
> > find_package(...without REQUIRED) instead of optional_find_package().
> > 
> > Can somebody else see a reason ?
> 
> I have to confess that I never called find_package() without REQUIRED,
> and I can't think about any use case right now.

E.g. in KDE many packages are optional, if they are not found, the program is 
built without the feature which that package would have provided.
The same for many other projects.
E.g. Qt too has a lot of switches at configure-time.

Alex



More information about the cmake-developers mailing list