[Breaking] Add global versioning. (#4936)

* Use CMake config file for representing version.

* Generate c and Python version file with CMake.

The generated file is written into source tree.  But unless XGBoost upgrades
its version, there will be no actual modification.  This retains compatibility
with Makefiles for R.

* Add XGBoost version the DMatrix binaries.
* Simplify prefetch detection in CMakeLists.txt
This commit is contained in:
Jiaming Yuan
2019-10-22 23:27:26 -04:00
committed by GitHub
parent 7e477a2adb
commit 5620322a48
18 changed files with 301 additions and 56 deletions

View File

@@ -58,6 +58,16 @@ typedef struct { // NOLINT(*)
float* value;
} XGBoostBatchCSR;
/*!
* \brief Return the version of the XGBoost library being currently used.
*
* The output variable is only written if it's not NULL.
*
* \param major Store the major version number
* \param minor Store the minor version number
* \param patch Store the patch (revision) number
*/
XGB_DLL void XGBoostVersion(int* major, int* minor, int* patch);
/*!
* \brief Callback to set the data to handle,