-
Notifications
You must be signed in to change notification settings - Fork 124
Fix failure with CMake 4 #1159
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
base: main
Are you sure you want to change the base?
Fix failure with CMake 4 #1159
Conversation
CMake 4 removed compatibility with CMake 3.5 so no valid generator will be found as the test CMakeLists.txt causes an error. Use the current CMake version to set the required version to avoid this
I don’t think this will fix it. 3.5 is still supported; it’s the 3.2 in I’ve put up #1160, which fixed the build for me in Nixpkgs. |
Ah, I guess perhaps this fixes something about the build system orchestration itself, which isn’t expecting the CMake warning, without affecting the tests? I suppose we are bypassing that layer in Nixpkgs so we haven’t noticed it… Both PRs might be needed, then. |
CMake actually fails, i.e. it is not just a warning
I'm actually encountered this when using scikit-build 0.11.1 when building a 3rd-party package. This change fixed the build. However after looking at the error message again you are right: It is Anyway: CMake 3.10 is deprecated and will be removed in a similar way, so this is just waiting to become an issue (again) and hence this change is required for future-proofing this code
To make the tests pass yes. |
I added 2 more commits : The first shows the CMake version used. With this the output will start with:
The other is just a minor doc enhancement to show using |
CMake 4 removed compatibility with CMake 3.5 so no valid generator will be found as the test CMakeLists.txt causes an error.
Use the current CMake version to set the required version to avoid this
Current CMake version used is 4.1. The error looks like:
BTW: Is there an easy way for a user to tell scikit-build to use an installed CMake instead of downloading one? That would also resolve this as the user can choose a lower version