[cmake-developers] How to cleanly get rid of CMake specific properties?
Alexander Neundorf
neundorf at kde.org
Sat Feb 18 13:11:05 EST 2012
On Saturday 18 February 2012, Eric Noulard wrote:
> Hi all,
>
> I'm pursuing my quest for a better CPack doc.
> First set of modifications are in master:
> cpack --help-command-xxx
> cpack --help-variable-xxx
> works.
>
> However variables are somehow "problematic" because I get all the
> properties defined for CMake in the doc because variables are a
> special kind of properties.
>
> CPack (or CTest) is using a instance of cmake object which does:
>
> this->InitializeProperties();
>
> in its constructor....
> so that I end up with a lot more properties in "full doc"
> i.e. in
> cpack --help-full
>
> Than I thought I shall.
> Now there is two options:
>
> 1) Avoid InitializeProperties(); in cmake object constructor and do
> that elsewhere
> for CMake and nowhere for CTest and CPack.
>
> 2) Let CTest and CPack keep the CMake inherited properties and filter out
> the unwaned CMake specific section in the doc.
>
> 1) is definitely easier but raise a question:
> Do CTest and CPack NEED the cmake property definition?
> Is this a wanted behavior or just an oversight?
> i.e. is set_property(...) supposed to work in a ctest or cpack
> loaded script?
>
> 2) is doable but require more work.
>
> in the same way should the "standard" variable doc section be inherited
> from CMake to CTest/CPack?
>
> try (I know it's not supposed to work but nevertheless):
> ctest --help-variable-list
>
> and you'll see what I mean.
2) sounds like a hack. If the properties are there, there should be a reason
for it, and then they should also appear in the documentation.
Alex
More information about the cmake-developers
mailing list