CMake style

Daan De Meyer daan.j.demeyer at gmail.com
Wed Jul 24 08:38:08 BST 2019


The KATE_VERSION variable was used in some source files but by passing the
version as a command line define via CMake allowed me to remove the
config.h file completely.

One more question: I have a few in progress patches for extra-cmake-modules
and ki18n on Phabricator that will allow me to streamline kate's CMake
configuration even more. Can these be used immediately after they are
merged or does each KDE application only use features from the latest
stable release? I'm asking this because I was surprised Kate built without
problems from source even though I only have the latest stable release of
all other KDE libraries installed on my system (instead of the git
versions).

Regards,

Daan

On Wed, 24 Jul 2019 at 08:28, Christoph Cullmann <christoph at cullmann.io>
wrote:

> On 2019-07-24 00:10, Daan De Meyer wrote:
> > Also as a follow-up question, I moved the two defines from kate's
> > config.h into the CMake scripts using `target_compile_definitions` and
> > the only thing left in it is the version. Does that mean the config.h
> > file can be removed or is there code that depends on the version
> > defined in the config.h file?
>
> Hi,
> don't think 3.1 should be a problem. config.h is Not required elsewhere
> I assume.
>
> Greetings
> Christoph
>
> >
> > Regards,
> >
> > Daan
> >
> > On Tue, 23 Jul 2019 at 23:55, Daan De Meyer <daan.j.demeyer at gmail.com>
> > wrote:
> >
> >> I've almost finished a pretty big cleanup of all the CMake files
> >> including addons. I standardized everything on 2 spaces.
> >>
> >> Should I just make a single revision on Phabricator or try to split
> >> it up into multiple revisions?
> >>
> >> I also upped the minimum CMake version to 3.1 (from 3.0) to have
> >> access to `target_sources`
> >> (https://cmake.org/cmake/help/latest/command/target_sources.html).
> >> Is that a problem?
> >>
> >> Regards,
> >>
> >> Daan
> >>
> >> On Tue, 23 Jul 2019 at 22:08, Christoph Cullmann
> >> <christoph at cullmann.io> wrote:
> >>
> >>> On 2019-07-23 18:04, Daan De Meyer wrote:
> >>>> Hi,
> >>>>
> >>>> I'm cleaning up the CMake scripts a little and was wondering
> >>> what
> >>>> style to use. Generally, CMake projects (outside of KDE) tend to
> >>> use 2
> >>>> space indentation but I'm seeing both 2 and 4 spaces indentation
> >>> in
> >>>> the CMake files (and see the .kateconfig specifying 4 spaces).
> >>> Is
> >>>> there a guideline I should follow here?
> >>>>
> >>>> Regards,
> >>>>
> >>>> Daan
> >>> Hi,
> >>>
> >>> Think we are flexible, would keep 2 spaces, if
> >>> our files are that already.
> >>>
> >>> Greetings
> >>> Christoph
> >>>
> >>> --
> >>> Ignorance is bliss...
> >>> https://cullmann.io | https://kate-editor.org
>
> --
> Ignorance is bliss...
> https://cullmann.io | https://kate-editor.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190724/549aa550/attachment-0001.html>


More information about the KWrite-Devel mailing list