-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Fix build-info on MSVC. #3309
Fix build-info on MSVC. #3309
Conversation
I tried with |
Below is the full output now, I updated
|
It shows up correctly at configure time, but when you run |
Interesting, I will need to do some research as I'm not overly familiar with cmake and I don't know why this is getting overwritten. EDIT1: So I did output the variable values and they are set properly during the configure phase but for some reason they are all blank during the build phase (even MSVC is blank). EDIT2: build-info.h is currently set to be rebuilt after a configure and this rebuild runs cmake in "script mode" which does not inherit variables from the parent process (it seems this is by design). So to fix this we need to update the parent
And add pass the variables:
|
@cebtenzzre I have added a commit to pass-in the variables let me know what you think, thanks. |
Now I understand how @slaren ran into this:
We need to pass CMAKE_C_COMPILER to the script as well, for use on non-Windows platforms. |
Seems to work fine on Linux and Windows. One other thing - cmake is able to identify the MSVC version:
Do you think we could make that appear in the build info? On Unix-like platforms, we use |
@cebtenzzre I added the compiler version, let me know if you need anything else. EDIT: I squashed the commits so this is a bit cleaner. |
9a8c831
to
86db9b1
Compare
…example * 'master' of github.com:ggerganov/llama.cpp: convert : remove bug in convert.py permute function (ggerganov#3364) make-ggml.py : compatibility with more models and GGUF (ggerganov#3290) gguf : fix a few general keys (ggerganov#3341) metal : reusing llama.cpp logging (ggerganov#3152) build : add ACCELERATE_NEW_LAPACK to fix warning on macOS Sonoma (ggerganov#3342) readme : add some recent perplexity and bpw measurements to READMES, link for k-quants (ggerganov#3340) cmake : fix build-info.h on MSVC (ggerganov#3309) docs: Fix typo CLBlast_DIR var. (ggerganov#3330) nix : add cuda, use a symlinked toolkit for cmake (ggerganov#3202)
Update
scripts/build-info.cmake
to fix erroring out using MSVC.Below shows the error this update is fixing.