Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to our build system CMake #63

Open
5 tasks
romangg opened this issue May 17, 2020 · 1 comment
Open
5 tasks

Improvements to our build system CMake #63

romangg opened this issue May 17, 2020 · 1 comment

Comments

@romangg
Copy link
Member

romangg commented May 17, 2020

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.
@romangg
Copy link
Member Author

romangg commented Aug 7, 2021

marked this issue as related to #81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant