mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add xgboost.
* gnu/packages/machine-learning.scm (xgboost): New variable. * gnu/packages/patches/xgboost-use-system-dmlc-core.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
parent
7e73fc3bb9
commit
6e5e60a20c
3 changed files with 67 additions and 0 deletions
34
gnu/packages/patches/xgboost-use-system-dmlc-core.patch
Normal file
34
gnu/packages/patches/xgboost-use-system-dmlc-core.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001
|
||||
From: Vinicius Monego <monego@posteo.net>
|
||||
Date: Tue, 11 May 2021 19:35:30 -0300
|
||||
Subject: [PATCH] Use dmlc-core from Guix.
|
||||
|
||||
---
|
||||
This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/
|
||||
|
||||
Rabit is now developed as part of xgboost, so we don't build it separately.
|
||||
|
||||
CMakeLists.txt | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6cc19fbd..3b42bc17 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -150,11 +150,9 @@ endif (USE_OPENMP)
|
||||
|
||||
# dmlc-core
|
||||
msvc_use_static_runtime()
|
||||
-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
|
||||
-set_target_properties(dmlc PROPERTIES
|
||||
- CXX_STANDARD 14
|
||||
- CXX_STANDARD_REQUIRED ON
|
||||
- POSITION_INDEPENDENT_CODE ON)
|
||||
+add_library(dmlc SHARED IMPORTED)
|
||||
+find_library(DMLC_LIBRARY dmlc)
|
||||
+set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}")
|
||||
if (MSVC)
|
||||
target_compile_options(dmlc PRIVATE
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
|
||||
--
|
||||
2.31.1
|
Loading…
Add table
Add a link
Reference in a new issue