scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

Add option to pass CMake cache file directly

Open LecrisUT opened this issue 2 months ago • 4 comments
trafficstars

@eirrgang sorry it took so long to get to this, but this should give you a more direct way to hook your cache-file as needed

LecrisUT avatar Sep 19 '25 16:09 LecrisUT

@eirrgang sorry it took so long to get to this, but this should give you a more direct way to hook your cache-file as needed

Sorry I missed the call this morning. Thanks for the help!

eirrgang avatar Sep 19 '25 17:09 eirrgang

What's wrong with passing -C? I'd like to focus on things that can't be done, not adding a second way to do things that are already supported. Is the order different, for example?

henryiii avatar Sep 25 '25 14:09 henryiii

What's wrong with passing -C? I'd like to focus on things that can't be done, not adding a second way to do things that are already supported. Is the order different, for example?

Mainly 2 usages:

  • Allow to be used with override and templating (I guess we did not add it to templating though)
  • Guarantee the ordering. I need to add the test to confirm how the ordering differs in relation to the InitCache, although if it always is at the end of it, this issue is mute.

LecrisUT avatar Sep 25 '25 15:09 LecrisUT

What's wrong with passing -C? I'd like to focus on things that can't be done, not adding a second way to do things that are already supported. Is the order different, for example?

For the record, I have added -C via CMAKE_ARGS in several projects with success. But I'm never sure whether I'm breaking current or future assumptions in scikit-build-core's internal machinery.

It might be that the integration tests for this issue are more important than the feature, now that https://github.com/orgs/scikit-build/discussions/1154#top is on record (even if not particularly google-able yet).

eirrgang avatar Sep 25 '25 15:09 eirrgang