Skip to content

Conversation

@trivialfis
Copy link
Member

No description provided.

@trivialfis trivialfis requested a review from Copilot July 23, 2025 19:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an optional CMake configuration to include a short git hash in the build information output. This allows users to identify the exact git commit used to build their XGBoost binary.

  • Adds a new CMake option BUILD_WITH_GIT_HASH to control git hash inclusion
  • Implements git hash retrieval using git rev-parse --short HEAD during CMake configuration
  • Exposes the git hash through the existing build info API by adding a "GIT_HASH" field

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
CMakeLists.txt Adds the BUILD_WITH_GIT_HASH CMake option
cmake/Utils.cmake Implements git hash retrieval and compilation definition setup
src/c_api/c_api.cc Adds conditional git hash field to build info output

@trivialfis trivialfis requested a review from hcho3 July 23, 2025 19:30
@trivialfis trivialfis merged commit e17f16a into dmlc:master Jul 24, 2025
78 of 82 checks passed
@trivialfis trivialfis deleted the build-git-hash branch July 24, 2025 06:00
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