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

Alexander Neundorf neundorf at kde.org
Mon Jun 20 12:40:18 EDT 2011


On Monday 20 June 2011, Brad King wrote:
> On 06/17/2011 12:55 PM, Alexander Neundorf wrote:
> > On Thursday 16 June 2011, Brad King wrote:
> >> On 06/16/2011 04:15 PM, Alexander Neundorf wrote:
> >>> I'll push a branch to the stage once 2.8.5 is released. Or can I do
> >>> that earlier ?
> >> 
> >> You can push it any time but skip merging it.
> > 
> > There should be a branch DisableSwitchForFindPackage now in stage.
> > Please have a look at it :-)
> 
> David and I just looked through this.  It looks pretty good.
> Here are some comments:
> 
> - In the first patch "return true" is indented incorrectly
> 
> - In the documentation patch please move mention of this variable down
>   to the bottom.  It is not important information for general authors
>   learning the command.  Certainly this information does not belong
>   in the short usage summary section above the full command signature.

Well, I put it at the end of the "simple" documentation and before the 
details, because IMO it is for users of the package and not for developers 
(which may need the details), so I thought it should be relatively early.

But I don't have a strong opinion on that.

> - The related-cache-entry warning is unnecessary overhead and does quite
>   a bit of work for a command that is supposed to do nothing.  The stated
>   use case of this feature is for packagers to add -DDISABLE_... arguments
>   to scripted calls to the "cmake" command line.  If they are adding extra
>   unused arguments defining things related to a disabled package then the
>   generic cli warning infrastructure will already complain about them.

I wasn't completely sure whether this warning is a good idea or not, that's 
why it is in a separate commit.


What is the recommended way how to do this with git ?


Simply add one more commit which does that or do I have to do something with 
rebase --interactive ?
How does that play together with the branch I already pushed ? Will this 
pushed branch get a new history ?

Alex



More information about the cmake-developers mailing list