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

[Meta] POC: can we use CMakePresets.json for some reasonable defaults? #1172

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

Conversation

Razish
Copy link
Member

@Razish Razish commented Sep 26, 2023

DO NOT MERGE

Just an experiment to see if we can make use of CMakePresets for some common, generic options.

It means I can do this:

cmake --preset=JK2 -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ../

instead of:

cmake -DBuildMPEngine=OFF -DBuildMPRdVanilla=OFF -DBuildMPDed=OFF -DBuildMPGame=OFF -DBuildMPCGame=OFF -DBuildMPUI=OFF -DBuildSPEngine=OFF -DBuildSPGame=OFF -DBuildSPRdVanilla=OFF -DBuildJK2SPEngine=ON -DBuildJK2SPGame=ON -DBuildJK2SPRdVanilla=ON -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ../

But CMake has stupid behavior when combining (inheriting) presets. It's not additive so you end up with combinatorial explosion and redefining explicit variables in each stanza.

We also (ideally) don't want our presets to contain any IDE or toolchain specific details (ref #1089)

How can we make use of and improve this?

@Razish Razish requested a review from a team September 26, 2023 08:19
@Razish Razish changed the title can we use CMakePresets.json for some reasonable defaults? POC: can we use CMakePresets.json for some reasonable defaults? Feb 10, 2024
@Razish Razish changed the title POC: can we use CMakePresets.json for some reasonable defaults? [Meta] POC: can we use CMakePresets.json for some reasonable defaults? Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant