extra-cmake-modules: ECM_VERSION() macro
Stephen Kelly
steveire at gmail.com
Mon Dec 12 13:16:42 UTC 2011
Alexander Neundorf wrote:
> On Wednesday 30 November 2011, Alexander Neundorf wrote:
>> On Wednesday 30 November 2011, Alexander Neundorf wrote:
>> > On Wednesday 30 November 2011, Stephen Kelly wrote:
>> > > Alexander Neundorf wrote:
>> > > > Hi,
>> > > >
>> > > > in extra-cmake-modules we have a file ECMVersion.cmake, which
>> > > > contains a macro ecm_version().
>> > > >
>> > > > This macro is not documented, and "ecm_version()" is not a good
>> > > > name for a function (or macro), since it doesn't contain a verb.
>> > > >
>> > > > How is this macro intended to be used ?
>> > > > Is it intended to be "public" or is it used only internally ?
>> > > >
>> > > > We have to be careful, once we ship a release we must keep
>> > > > compatibility.
>> > > >
>> > > > Alex
>> > >
>> > > Each framework uses it in the frameworks branch. The idea is to have
>> > > a compact way to set the version which could be updated by scripty
>> > > (as there may be many more places where the version needs to be
>> > > updated on release)
>> >
>> > Can you please add documentation to it ?
>> > How about changing the name to ecm_declare_version_variables() or
>> > something like that ?
>> > ecm_declare_version(), ecm_set_version_variables(), ...
>> > It really should have a verb in it.
>>
>> How about
>> ecm_set_version_variables( [PREFIX prefix] VERSION x y z) ?
>
> I added a
>
> ecm_set_version_variables( <prefix> <major> <minor> <patch>)
Thanks, sorry I didn't get around to doing this.
>
> to extra-cmake-modules, including documentation.
> As prefix a project-specific prefix should be used, e.g. in kio "KIO"
> would be a good choice, which would give KIO_VERSION_MAJOR etc.
>
> If we agree on this, I'll put a deprecation message in ECMVersion.cmake
> and remove it new year or so.
If we port away from it we can just remove it. No need to deprecate and do a
delayed removal.
>
> Some doubts I still have:
> * we set FOO_VERSION_MAJOR, while cmake defines for itself
> CMAKE_MAJOR_VERSION, i.e. just the other way round.
I might have been following KDE convention there. I don't mind changing it
for consistency with CMake.
> * the prefix could be made optional, and if none is given, the name of the
> current project would be used, i.e. if no name has been set
> PROJECT_MAJOR_VERSION etc.
>
Sure.
> Comments ?
I'm happy enough with the proposed changes. I think we'll need to think
harder about the way frameworks are built with ECMQtFramework anyway. I
wrote that partially experimentally looking for feedback, but there's some
hacks in it which I don't really like (a lot of stuff with the project
name).
Thanks,
Steve.
More information about the Kde-frameworks-devel
mailing list