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

Brad King brad.king at kitware.com
Mon Jun 20 13:46:21 EDT 2011


On 06/20/2011 12:40 PM, Alexander Neundorf wrote:
> On Monday 20 June 2011, Brad King wrote:
>> - 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.

Since it is a variable and not an argument to the command I suggest that
it be added to cmDocumentVariables too.  Put the full detailed description
there and perhaps also describe the intended use case.  Then just add a
once-sentence summary and reference to the variable at the end of the
find_package details documentation.  That way you can add as much detail
as we need without cluttering the main command documentation.

> 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 ?

As you guessed, interactive rebase is the correct approach.  Since
you have not merged the topic you are free to overwrite it on the
topic stage.  The old version of the history will be replaced with
the new version.  It might feel funny the first time but it is nice
and easy once you get the idea.  I use it all the time locally to
clean up and organize a topic into a logical series of changes
before pushing it out.

-Brad



More information about the cmake-developers mailing list