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
a9d9b119
Unverified
Commit
a9d9b119
authored
Mar 21, 2021
by
Nikita Titov
Committed by
GitHub
Mar 21, 2021
Browse files
store all CMake files in one place (#4087)
parent
4ded1342
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
8 deletions
+16
-8
CMakeLists.txt
CMakeLists.txt
+3
-4
build-cran-package.sh
build-cran-package.sh
+0
-1
build_r.R
build_r.R
+8
-0
cmake/IntegratedOpenCL.cmake
cmake/IntegratedOpenCL.cmake
+0
-0
cmake/modules/FindLibR.cmake
cmake/modules/FindLibR.cmake
+0
-0
python-package/MANIFEST.in
python-package/MANIFEST.in
+1
-1
python-package/setup.py
python-package/setup.py
+4
-2
No files found.
CMakeLists.txt
View file @
a9d9b119
...
...
@@ -100,7 +100,6 @@ include_directories(${EIGEN_DIR})
ADD_DEFINITIONS
(
-DEIGEN_MPL2_ONLY
)
if
(
__BUILD_FOR_R
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
PROJECT_SOURCE_DIR
}
/cmake/modules"
)
find_package
(
LibR REQUIRED
)
message
(
STATUS
"LIBR_EXECUTABLE:
${
LIBR_EXECUTABLE
}
"
)
message
(
STATUS
"LIBR_INCLUDE_DIRS:
${
LIBR_INCLUDE_DIRS
}
"
)
...
...
@@ -157,7 +156,7 @@ endif(USE_GPU)
if
(
__INTEGRATE_OPENCL
)
if
(
WIN32
)
include
(
CM
akeIntegratedOpenCL.cmake
)
include
(
cm
ake
/
IntegratedOpenCL.cmake
)
ADD_DEFINITIONS
(
-DUSE_GPU
)
else
()
message
(
FATAL_ERROR
"Integrated OpenCL build is available only for Windows"
)
...
...
@@ -418,10 +417,10 @@ if(USE_GPU)
endif
(
USE_GPU
)
if
(
__INTEGRATE_OPENCL
)
# targets OpenCL and Boost are added in
CMake
IntegratedOpenCL.cmake
# targets OpenCL and Boost are added in IntegratedOpenCL.cmake
add_dependencies
(
lightgbm OpenCL Boost
)
add_dependencies
(
_lightgbm OpenCL Boost
)
# variables INTEGRATED_OPENCL_* are set in
CMake
IntegratedOpenCL.cmake
# variables INTEGRATED_OPENCL_* are set in IntegratedOpenCL.cmake
target_include_directories
(
lightgbm PRIVATE
${
INTEGRATED_OPENCL_INCLUDES
}
)
target_include_directories
(
_lightgbm PRIVATE
${
INTEGRATED_OPENCL_INCLUDES
}
)
target_compile_definitions
(
lightgbm PRIVATE
${
INTEGRATED_OPENCL_DEFINITIONS
}
)
...
...
build-cran-package.sh
View file @
a9d9b119
...
...
@@ -63,7 +63,6 @@ cd ${TEMP_R_DIR}
# Remove files not needed for CRAN
echo
"Removing files not needed for CRAN"
rm
src/install.libs.R
rm
-r
src/cmake/
rm
-r
inst/
rm
-r
pkgdown/
rm
cran-comments.md
...
...
build_r.R
View file @
a9d9b119
...
...
@@ -316,6 +316,14 @@ for (submodule in list.dirs(
}
# copy files into the place CMake expects
CMAKE_MODULES_R_DIR
<-
file.path
(
TEMP_SOURCE_DIR
,
"cmake"
,
"modules"
)
dir.create
(
CMAKE_MODULES_R_DIR
,
recursive
=
TRUE
)
result
<-
file.copy
(
from
=
file.path
(
"cmake"
,
"modules"
,
"FindLibR.cmake"
)
,
to
=
sprintf
(
"%s/"
,
CMAKE_MODULES_R_DIR
)
,
overwrite
=
TRUE
)
.handle_result
(
result
)
for
(
src_file
in
c
(
"lightgbm_R.cpp"
,
"lightgbm_R.h"
,
"R_object_helper.h"
))
{
result
<-
file.copy
(
from
=
file.path
(
TEMP_SOURCE_DIR
,
src_file
)
...
...
CM
akeIntegratedOpenCL.cmake
→
cm
ake
/
IntegratedOpenCL.cmake
View file @
a9d9b119
File moved
R-package/src/
cmake/modules/FindLibR.cmake
→
cmake/modules/FindLibR.cmake
View file @
a9d9b119
File moved
python-package/MANIFEST.in
View file @
a9d9b119
...
...
@@ -3,7 +3,7 @@ include LICENSE
include *.rst *.txt
recursive-include lightgbm VERSION.txt *.py *.so
include compile/CMakeLists.txt
include compile/
CM
akeIntegratedOpenCL.cmake
include compile/
cm
ake
/
IntegratedOpenCL.cmake
recursive-include compile *.so
recursive-include compile/Release *.dll
include compile/external_libs/compute/CMakeLists.txt
...
...
python-package/setup.py
View file @
a9d9b119
...
...
@@ -83,8 +83,10 @@ def copy_files(integrated_opencl=False, use_gpu=False):
os
.
path
.
join
(
CURRENT_DIR
,
"compile"
,
"CMakeLists.txt"
),
verbose
=
0
)
if
integrated_opencl
:
copy_file
(
os
.
path
.
join
(
CURRENT_DIR
,
os
.
path
.
pardir
,
"CMakeIntegratedOpenCL.cmake"
),
os
.
path
.
join
(
CURRENT_DIR
,
"compile"
,
"CMakeIntegratedOpenCL.cmake"
),
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
CURRENT_DIR
,
"compile"
,
"cmake"
)):
os
.
makedirs
(
os
.
path
.
join
(
CURRENT_DIR
,
"compile"
,
"cmake"
))
copy_file
(
os
.
path
.
join
(
CURRENT_DIR
,
os
.
path
.
pardir
,
"cmake"
,
"IntegratedOpenCL.cmake"
),
os
.
path
.
join
(
CURRENT_DIR
,
"compile"
,
"cmake"
,
"IntegratedOpenCL.cmake"
),
verbose
=
0
)
...
...
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