Skip to content

Commit

Permalink
cleaned up handling of R package
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Mar 25, 2020
1 parent 2d49632 commit bb70787
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,16 @@ file(GLOB SOURCES
)

add_executable(lightgbm src/main.cpp ${SOURCES})
set(SOURCES "${SOURCES} src/c_api.cpp")

add_library(_lightgbm SHARED src/c_api.cpp ${SOURCES})
# Only build the R part of the library if building for
# use with the R package
if(BUILD_FOR_R)
add_library(_lightgbm SHARED src/lightgbm_R.cpp)
set(SOURCES "${SOURCES} lightgbm_R.cpp")
endif(BUILD_FOR_R)

add_library(_lightgbm SHARED ${SOURCES})

if(MSVC)
set_target_properties(_lightgbm PROPERTIES OUTPUT_NAME "lib_lightgbm")
endif(MSVC)
Expand Down
3 changes: 0 additions & 3 deletions windows/LightGBM.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,11 @@
<ClInclude Include="..\include\LightGBM\dataset.h" />
<ClInclude Include="..\include\LightGBM\dataset_loader.h" />
<ClInclude Include="..\include\LightGBM\feature_group.h" />
<ClInclude Include="..\include\LightGBM\lightgbm_R.h" />
<ClInclude Include="..\include\LightGBM\meta.h" />
<ClInclude Include="..\include\LightGBM\metric.h" />
<ClInclude Include="..\include\LightGBM\network.h" />
<ClInclude Include="..\include\LightGBM\objective_function.h" />
<ClInclude Include="..\include\LightGBM\prediction_early_stop.h" />
<ClInclude Include="..\include\LightGBM\R_object_helper.h" />
<ClInclude Include="..\include\LightGBM\tree.h" />
<ClInclude Include="..\include\LightGBM\tree_learner.h" />
<ClInclude Include="..\include\LightGBM\utils\array_args.h" />
Expand Down Expand Up @@ -308,7 +306,6 @@
<ClCompile Include="..\src\io\metadata.cpp" />
<ClCompile Include="..\src\io\parser.cpp" />
<ClCompile Include="..\src\io\tree.cpp" />
<ClCompile Include="..\src\lightgbm_R.cpp" />
<ClCompile Include="..\src\metric\dcg_calculator.cpp" />
<ClCompile Include="..\src\metric\metric.cpp" />
<ClCompile Include="..\src\network\network.cpp" />
Expand Down
9 changes: 0 additions & 9 deletions windows/LightGBM.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@
<ClInclude Include="..\src\metric\map_metric.hpp">
<Filter>src\metric</Filter>
</ClInclude>
<ClInclude Include="..\include\LightGBM\lightgbm_R.h">
<Filter>include\LightGBM</Filter>
</ClInclude>
<ClInclude Include="..\include\LightGBM\R_object_helper.h">
<Filter>include\LightGBM</Filter>
</ClInclude>
<ClInclude Include="..\src\boosting\rf.hpp">
<Filter>src\boosting</Filter>
</ClInclude>
Expand Down Expand Up @@ -296,9 +290,6 @@
<ClCompile Include="..\src\boosting\prediction_early_stop.cpp">
<Filter>src\boosting</Filter>
</ClCompile>
<ClCompile Include="..\src\lightgbm_R.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\src\boosting\gbdt_model_text.cpp">
<Filter>src\boosting</Filter>
</ClCompile>
Expand Down

0 comments on commit bb70787

Please sign in to comment.