microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22k stars 6.12k forks source link

[xgboost] Add open-source library xgboost to vcpkg #38743

Open DadanielZ opened 4 weeks ago

DadanielZ commented 4 weeks ago

Add open-source library xgboost to vcpkg xgboost github repo: https://github.com/dmlc/xgboost/

Urfoex commented 2 weeks ago

Not sure, if it helps, but here is our overlay port of xgboost of version v2.0.3 xgboost.tar.gz

We are using it to build our application getML on Linux.

dg0yt commented 2 weeks ago

The x86 and arm64 logs seem to indicate problems with intrinsics IIUC. And uwp doesn't offer some of the windows API. Probably these triplets need to be excluded from supported. There is also a warning

cl : Command line warning D9025 : overriding '/MTd' with '/MDd'
hcho3 commented 2 weeks ago

@dg0yt Currently, XGBoost sets the MSVC link flags (/MT or /MD) by editing the raw build flags, an approach I feel is potentially problematic (https://github.com/dmlc/xgboost/issues/10344). Do you think fixing this would help with distributing XGBoost on vcpkg?

dg0yt commented 2 weeks ago

You just have to use the options it offers. CMAKE_MSVC_RUNTIME_LIBRARY isn't used by the vcpkg toolchain which controls flags directly and still supports older versions of CMake.

hcho3 commented 2 weeks ago

Got it. Would it be a problem for you if XGBoost would start using CMAKE_MSVC_RUNTIME_LIBRARY flag and require CMake 3.15 some time in the future?

dg0yt commented 2 weeks ago

Got it. Would it be a problem for you if XGBoost would start using CMAKE_MSVC_RUNTIME_LIBRARY flag and require CMake 3.15 some time in the future?

Nothing which couldn't be solved. The key is that projects don't change flags which are meant do be set by the user or toolchain.