-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial import of xgboost cpp test lib and app
- Loading branch information
1 parent
20dae18
commit 7d4d6f2
Showing
21 changed files
with
1,677 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
|
||
# Emacs files | ||
*.*~ | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright (c) 2015-2017, David Hirvonen, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
# WIP C++ interface + serialization for xgboost library | ||
# NOTE: This is using the xgboost fork in the hunter | ||
# package manager which has some non-standard extensions | ||
# for cross platform and size reduced serialization. | ||
# It also uses OpenMP, whereas the lastest versions | ||
# uses a C++11 thread interface. | ||
|
||
# TODO: Add a more recent xgboost to hunter | ||
|
||
cmake_minimum_required(VERSION 3.0) | ||
|
||
### Hunter snapshot that will be used ### | ||
include("cmake/HunterGate.cmake") | ||
HunterGate( | ||
URL "https://github.com/ruslo/hunter/archive/v0.18.44.tar.gz" | ||
SHA1 "a78f0b377b8e53c038f12fc18b0c02564c4534c8" | ||
) | ||
|
||
set(XGBOOSTCPP_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
project(xgboostcpp VERSION 0.1.0) # WIP! | ||
|
||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
option(XGBOOSTER_BUILD_TESTS "Build tests" ON) | ||
option(XGBOOSTER_SERIALIZE_WITH_BOOST "Serialize w/ boost" ON) | ||
option(XGBOOSTER_SERIALIZE_WITH_CEREAL "Serialize w/ cereal" ON) | ||
|
||
################### | ||
## Dependencies ### | ||
################### | ||
|
||
hunter_add_package(xgboost) | ||
find_package(xgboost CONFIG REQUIRED) | ||
|
||
if(XGBOOSTER_SERIALIZE_WITH_BOOST) | ||
hunter_add_package(boost-pba) | ||
find_package(boost-pba CONFIG REQUIRED) | ||
endif() | ||
|
||
if(XGBOOSTER_SERIALIZE_WITH_CEREAL) | ||
hunter_add_package(cereal) | ||
find_package(cereal CONFIG REQUIRED) | ||
endif() | ||
|
||
############## | ||
## Project ### | ||
############## | ||
|
||
add_subdirectory(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
build.py --toolchain android-ndk-r10e-api-16-armeabi-v7a-neon-clang-35 --verbose --fwd HUNTER_CONFIGURATION_TYPES=Release ANDROID=TRUE --clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
build.py --toolchain libcxx --verbose --fwd HUNTER_CONFIGURATION_TYPES=Release --jobs 8 --clear --strip | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
ARGS=( | ||
--verbose | ||
--fwd HUNTER_CONFIGURATION_TYPES=Release | ||
--jobs 8 | ||
--reconfig | ||
--install | ||
) | ||
|
||
build.py --toolchain xcode ${ARGS[@]} --open --nobuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
find src -name "*.cpp" -or -name "*.h" -or -name "*.hpp" -or -name CMakeLists.txt | xargs etags --append |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(xgboost CONFIG) | ||
|
||
if(@XGBOOSTER_SERIALIZE_WITH_BOOST@) | ||
find_dependency(boost-pba CONFIG) | ||
endif() | ||
|
||
if(@XGBOOSTER_SERIALIZE_WITH_CEREAL@) | ||
find_dependency(cereal CONFIG REQUIRED) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
check_required_components("@PROJECT_NAME@") |
Oops, something went wrong.