Skip to content

Conversation

@rhubert
Copy link
Contributor

@rhubert rhubert commented Jan 21, 2026

No description provided.

@rhubert
Copy link
Contributor Author

rhubert commented Jan 21, 2026

In theory these PR's are ready. But since I'm updating to the latest versions (we have updated to a different version internally) I'd like to merge everything together and do a final build...

@@ -1,7 +1,7 @@
inherit: [cpackage, ninja, install, licenses]
inherit: [cpackage, ninja, install, licenses, make]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that doesn't work this way. After merging #282, the ninja and make classes set different values for the jobServer key. 😕

The only way forward that I see is to move the common parts of this class to classes/basement/bits/cmake.yaml and create a new class cmake-make that does inherit: ["basement::bits::cmake", make].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢 Bad timing... I have not rebased to #282...

I need this for only one package. I'll move make-inherit to the recipe and leave only the CMAKE_GENERATOR change here..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fragile. I just had another idea. We could set jobServer: "fifo" explicitly in the cmake class again with a big, fat comment explaining why. This mode is compatible with both tools...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If make understands fifo as well why do we not simply set jobServer: "fifo" in the make-class?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will fail if you start Bob from an old make. See here. OTOH, as soon as you hit a cmake/ninja recipe, this will happen anyway. Looking back, it should probably be a warning and just not pass the incompatible job server instead of failing.

Having said that, it sounds like an artificial problem. So using "fifo" consistently looks like the best way forward. Let's do it this way...

Some builds are failing if ninja is used while the succeed with make.
Make the Generator setable and support 'Unix Makefiles' next to ninja.
CMake 4.0 removed support for cmake_minium_version <= 3.5 ([1]). Since
there are still packages around requiring older cmake versions add a
cmake-3.31 class to be used by them.

[1] https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
@rhubert rhubert marked this pull request as ready for review January 23, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants