On Wednesday 11 September 2013 16:26:47 Pali Rohár wrote:
> On Saturday 10 August 2013 21:12:22 Jan Kundrát wrote:
> > On Saturday, 10 August 2013 19:00:34 CEST, Pali Rohár wrote:
> > > What about to have two options OFF and AUTO? And write
> > > status if feature will be compiled or not (depending on
> > > find_package)?
> > 
> > Kitware talks about something similar at [1]. I've tried to
> > apply that and the result is available at [2]. It can even
> > show a nice combobox in cmake-gui :). It's rather verbose,
> > though -- a macro for wrapping this might be a good idea
> > (until we introduce the dependant options...).
> > 
> > Suggestions welcome.
> > 
> > [1] http://www.kitware.com/blog/home/post/82
> > [2]
> > http://repo.or.cz/w/trojita.git/patch/f2a2ef5350b9fdfded33b2
> > b1 5c78acb6c3e67995
> 
> Now working on cmake macros for ON/AUTO/OFF options which also
> cover find_package properly.

First version of code is in my pali-gsoc branch. It extend 
cmake_dependent_option for supporting ON/AUTO/OFF options and 
adding wrapper around find_package to fail if option was set to ON 
and package was not found.

By default all options are in AUTO state which means that 
features will be enabled based on found libraries/packages.

Packagers can set options to ON to make sure that option (or 
plugin) will be compiled and if there is problem, cmake report 
error.

-- 
Pali Rohár
pali.ro...@gmail.com

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to