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

Initial support for cmake.preset #994

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

Conversation

LecrisUT
Copy link
Collaborator

Back in #790 I commented that we could support configurePresets if we overwrite the binarydir. It seems to work fine, but I realized we still have an issue to discuss how to deal with the generator. My thinking is that depending on make-fallback value and if preset is present we deffer to the value of preset and let it handle the rest. Although not sure how to detect/handle multi-config then, but wouldn't it build all configs if it wasn't specified explicitly? The documentation of make-fallback is also confusing me a bit.

PS: it took me way too long to figure out nox -t gen was a thing 🤦

@LecrisUT LecrisUT force-pushed the preset branch 2 times, most recently from 1c4ae1f to 9f9b879 Compare February 19, 2025 18:53
@@ -273,8 +273,12 @@ def __init__(
new_min_cmake = "3.15"
self.settings.cmake.version = SpecifierSet(f">={new_min_cmake}")

default_cmake_minimum = "3.15"
if self.settings.cmake.preset:
default_cmake_minimum = "3.19"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think I am handling this part correctly. Generally it should not be tied to the auto-cmake version, but not sure where to feed it to override potential values set by the user. Or we just fail it at builder.cmake?

@LecrisUT LecrisUT force-pushed the preset branch 2 times, most recently from 4cfc481 to cf19fc1 Compare February 20, 2025 12:42
"OVERWRITTEN_VAR": "original"
},
"binaryDir": "/dev/null",
"generator": "Ninja"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Windows disapproves, but empty generator is only available in version 3. Not sure if I can bump it and satisfy the other builders. What generator value is available on windows?

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.

1 participant