Skip to content

Add CMakePresets support #8739

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Montel
Copy link
Contributor

@Montel Montel commented Jun 20, 2025

No description provided.

Copy link
Member

@tronical tronical left a comment

Choose a reason for hiding this comment

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

I think a presets file is a good thing to have in the repo. @hunger @ogoffart thoughts?

@@ -0,0 +1,59 @@
{
"version": 3,
Copy link
Member

Choose a reason for hiding this comment

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

Could you perhaps add a schema reference as well, so that auto-completion work? See https://martin-fieber.de/blog/cmake-presets/#create-a-preset for an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok I will look at it.

]
},
{
"name": "dev",
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 curious: is there a specific reason to prefer dev over debug, when the counter profile is called release? (I think debug and release are more common cmake terms than dev)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi :) just I use by default in kde 'dev' => development
but I will rename as debug :)

@ogoffart
Copy link
Member

I think a presets file is a good thing to have in the repo. @hunger @ogoffart thoughts?

What is the usecase? Is it to help people contributing to Slint?
In that case, I think it should include the flag that one usually would pass to work with Slint: CMAKE_EXPORT_COMPILE_COMMANDS, SLINT_BUILD_TESTING. Also release should probably be RelWithDebInfo

The extra .license file is a bit of noise and this information can be put in the REUSE.toml

@Montel
Copy link
Contributor Author

Montel commented Jun 27, 2025

I think a presets file is a good thing to have in the repo. @hunger @ogoffart thoughts?

What is the usecase? Is it to help people contributing to Slint? In that case, I think it should include the flag that one usually would pass to work with Slint: CMAKE_EXPORT_COMPILE_COMMANDS, SLINT_BUILD_TESTING. Also release should probably be RelWithDebInfo

The extra .license file is a bit of noise and this information can be put in the REUSE.toml

Yep it's mainly for helping people contributing to Slint.
I will add these variable too

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.

3 participants