Unverified Commit 1c5930bf authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] Remove CLI-only objects (#3566)



* [R-package] Remove CLI-only objects

* more guards

* more guards

* variable not string

* simplify fix

* revert build_r.R changes

* move define of global_timer
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent b07afa46
......@@ -318,7 +318,6 @@ if(USE_MPI)
endif(USE_MPI)
file(GLOB SOURCES
src/application/*.cpp
src/boosting/*.cpp
src/io/*.cpp
src/metric/*.cpp
......@@ -330,7 +329,7 @@ if(USE_CUDA)
endif(USE_CUDA)
)
add_executable(lightgbm src/main.cpp ${SOURCES})
add_executable(lightgbm src/main.cpp src/application/application.cpp ${SOURCES})
list(APPEND SOURCES "src/c_api.cpp")
# Only build the R part of the library if building for
......
......@@ -21,7 +21,6 @@ PKG_LIBS = \
-pthread
OBJECTS = \
application/application.o \
boosting/boosting.o \
boosting/gbdt.o \
boosting/gbdt_model_text.o \
......
......@@ -22,7 +22,6 @@ PKG_LIBS = \
-lIphlpapi
OBJECTS = \
application/application.o \
boosting/boosting.o \
boosting/gbdt.o \
boosting/gbdt_model_text.o \
......
......@@ -40,8 +40,10 @@ cd ${TEMP_R_DIR}
rm AUTOCONF_UBUNTU_VERSION
rm recreate-configure.sh
# main.cpp is used to make the lightgbm CLI, unnecessary
# for the R package
# files only used by the lightgbm CLI aren't needed for
# the R package
rm src/application/application.cpp
rm src/include/LightGBM/application.h
rm src/main.cpp
# configure.ac and DESCRIPTION have placeholders for version
......
......@@ -28,8 +28,6 @@
namespace LightGBM {
Common::Timer global_timer;
Application::Application(int argc, char** argv) {
LoadParameters(argc, argv);
// set number of threads for openmp
......
......@@ -17,6 +17,8 @@
namespace LightGBM {
Common::Timer global_timer;
int LGBM_config_::current_device = lgbm_device_cpu;
int LGBM_config_::current_learner = use_cpu_learner;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment