Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
86993571
"tests/git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "60c92a969a0075cd271d55e40b611aaf52b061ed"
Commit
86993571
authored
Jun 22, 2017
by
Guolin Ke
Browse files
refine R build.
parent
041ef701
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
R-package/DESCRIPTION
R-package/DESCRIPTION
+2
-2
R-package/build_package.R
R-package/build_package.R
+12
-6
R-package/src/install.libs.R
R-package/src/install.libs.R
+9
-1
No files found.
R-package/DESCRIPTION
View file @
86993571
Package: lightgbm
Package: lightgbm
Type: Package
Type: Package
Title: Light Gradient Boosting Machine
Title: Light Gradient Boosting Machine
Version: 0.2
Version:
2.
0.2
Date: 2017-06-
05
Date: 2017-06-
22
Author: Guolin Ke <guolin.ke@microsoft.com>
Author: Guolin Ke <guolin.ke@microsoft.com>
Maintainer: Guolin Ke <guolin.ke@microsoft.com>
Maintainer: Guolin Ke <guolin.ke@microsoft.com>
Description: LightGBM is a gradient boosting framework that uses tree based learning algorithms.
Description: LightGBM is a gradient boosting framework that uses tree based learning algorithms.
...
...
R-package/build_package.R
View file @
86993571
if
(
!
file.copy
(
"./../include"
,
"src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
unlink
(
"./src/include"
,
recursive
=
TRUE
)
unlink
(
"./src/src"
,
recursive
=
TRUE
)
unlink
(
"./src/compute"
,
recursive
=
TRUE
)
unlink
(
"./src/build"
,
recursive
=
TRUE
)
unlink
(
"./src/Release"
,
recursive
=
TRUE
)
if
(
!
file.copy
(
"./../include"
,
"./src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
stop
(
"Cannot find folder LightGBM/include"
)
stop
(
"Cannot find folder LightGBM/include"
)
}
}
if
(
!
file.copy
(
"./../src"
,
"src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
if
(
!
file.copy
(
"./../src"
,
"
./
src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
stop
(
"Cannot find folder LightGBM/src"
)
stop
(
"Cannot find folder LightGBM/src"
)
}
}
if
(
!
file.copy
(
"./../compute"
,
"src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
if
(
!
file.copy
(
"./../compute"
,
"
./
src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
print
(
"Cannot find folder LightGBM/compute, will disable GPU build"
)
print
(
"Cannot find folder LightGBM/compute, will disable GPU build"
)
}
}
if
(
!
file.copy
(
"./../CMakeLists.txt"
,
"src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
if
(
!
file.copy
(
"./../CMakeLists.txt"
,
"
./
src/"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
stop
(
"Cannot find file LightGBM/CMakeLists.txt"
)
stop
(
"Cannot find file LightGBM/CMakeLists.txt"
)
}
}
if
(
!
file.exists
(
"src/_IS_FULL_PACKAGE"
))
{
if
(
!
file.exists
(
"
./
src/_IS_FULL_PACKAGE"
))
{
file.create
(
"src/_IS_FULL_PACKAGE"
)
file.create
(
"
./
src/_IS_FULL_PACKAGE"
)
}
}
system
(
"R CMD build --no-build-vignettes ."
)
system
(
"R CMD build --no-build-vignettes ."
)
file.remove
(
"./src/_IS_FULL_PACKAGE"
)
R-package/src/install.libs.R
View file @
86993571
...
@@ -3,6 +3,10 @@ use_precompile <- FALSE
...
@@ -3,6 +3,10 @@ use_precompile <- FALSE
use_gpu
<-
FALSE
use_gpu
<-
FALSE
use_mingw
<-
FALSE
use_mingw
<-
FALSE
if
(
.Machine
$
sizeof.pointer
!=
8
){
stop
(
"Only support 64-bit R, please check your the version of your R and Rtools."
)
}
# Check for precompilation
# Check for precompilation
if
(
!
use_precompile
)
{
if
(
!
use_precompile
)
{
...
@@ -11,6 +15,10 @@ if (!use_precompile) {
...
@@ -11,6 +15,10 @@ if (!use_precompile) {
setwd
(
source_dir
)
setwd
(
source_dir
)
if
(
!
file.exists
(
"_IS_FULL_PACKAGE"
))
{
if
(
!
file.exists
(
"_IS_FULL_PACKAGE"
))
{
unlink
(
"./include"
,
recursive
=
TRUE
)
unlink
(
"./src"
,
recursive
=
TRUE
)
unlink
(
"./compute"
,
recursive
=
TRUE
)
unlink
(
"./build"
,
recursive
=
TRUE
)
if
(
!
file.copy
(
"./../../include"
,
"./"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
if
(
!
file.copy
(
"./../../include"
,
"./"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
stop
(
"Cannot find folder LightGBM/include"
)
stop
(
"Cannot find folder LightGBM/include"
)
}
}
...
@@ -24,7 +32,7 @@ if (!use_precompile) {
...
@@ -24,7 +32,7 @@ if (!use_precompile) {
}
}
}
}
if
(
!
file.copy
(
"./../../CMakeLists.txt"
,
"./"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
if
(
!
file.copy
(
"./../../CMakeLists.txt"
,
"./"
,
overwrite
=
TRUE
,
recursive
=
TRUE
))
{
stop
(
"Cannot find file LightGBM/CMakeLists.txt"
)
stop
(
"Cannot find file LightGBM/CMakeLists.txt"
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment