Skip to content

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

scikit-build-core installs ninja via pip anyway, doesn't it? It should be ok to set Ninja on all platforms unconditionally.

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 is the black sheep here, and there is some logic on scikit-build-core around it. Don't remember the details though. There is also the logic around make-fallback option which confused me a bunch when I first attempted this

@alexreinking
Copy link
Contributor

This would be really useful as I could replace my [cmake.define] table with a {wheel_tag} preset. I'd like to help. What's the blocker here?

@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Aug 7, 2025

This would be really useful as I could replace my [cmake.define] table with a {wheel_tag} preset. I'd like to help. What's the blocker here?

I need to rebase this and run the CI again. Iirc the issue was something to do with windows even when we overwrote the generator. I will not have a pc to work for about 1 week, but could you try a simple rebase and opening a PR in your fork to check the failure again?

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