Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve build-info.cpp generation #14156

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

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

ckastner
Copy link
Collaborator

@ckastner ckastner commented Jun 12, 2025

Simplify it, and generate it in the build dir, rather than the source dir.

For one, keeping common/cmake/build-info-gen-cpp.cmake out of the main cmake/ is confusing, especially since it depends on cmake/build-info.cmake there.

Also the add_custom_command(cmake ... -P script) didn't inherit any variables which means they had to be passed on explicitly. I needed to add variables but this became convoluted so I simplified it instead.

I assume that the add_custom_command(cmake) was only added for the dependency on .git/index, I found a workaround for that. This allowed me to drop the complicated stuff and reduce this to a configure_file which now also writes to the build dir instead of the source dir.

ckastner added 2 commits June 12, 2025 23:58
The rebuild of build-info.cpp still gets triggered when .git/index gets
changes.
@ckastner ckastner force-pushed the simplify-build-info branch from 35480fb to ad08795 Compare June 12, 2025 21:59
@ggerganov ggerganov merged commit 09cf2c7 into ggml-org:master Jun 13, 2025
47 checks passed
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