Skip to content

Improvements to our build system CMake #63

@romangg

Description

@romangg

This is an overview task.

What is CMake

CMake is Wrapland's build system. It manages building, installing and exporting Wrapland's libraries.

CMake is probably the most used build system for C++ projects. It is feature-rich but also pretty complicated with unusual syntax. For an introduction read:

Current state

Missing documentation for ECM

We inherited usage of extra-cmake-modules (ECM) from KWayland. These are well contained but sadly not well documented. When looking for information to generate coverage reports for #61 I did not find any useful information besides some module that basically does nothing.

Because of the missing documentation ECM is rather opaque with an all-or-nothing approach heavily focused on KDE frameworks needs. For other projects it is difficult to understand in full and to assess how suited ECM is in the end.

Looking online we can find projects with way better documentation that also promise to use modern CMake. See above introduction articles and following projects or additional information:

Issues

  • Install paths are not capitalized consistently.
  • Installed headers are not clickable in Qt Creator (maybe only an issue on my system?).

Next tasks

We want a simple and robust CMake build system using modern CMake paradigms and most recent CMake features. For that let's define some direct tasks.

  • cmake-format reformats CMake files like clang-format does for code. Add it to CI. Apply cmake-format to CMake files #81
  • CMake 3.16 supports precompiled headers. Make use of this feature. See this article for more info.
  • Use CMake 3.8 meta-compiler features instead of setting variables as explained here.
  • Set project version in call to project().
  • Use either Wrapland:: or WraplandServer:: + WraplandClient:: namespaces. For reasoning about this see here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions