[CI] Simplify CMake build with modern CMake techniques (#5871)

* [CI] Simplify CMake build

* Make sure that plugins can be built

* [CI] Install lz4 on Mac
This commit is contained in:
Philip Hyunsu Cho
2020-07-08 04:23:24 -07:00
committed by GitHub
parent 22a31b1faa
commit 0d411b0397
10 changed files with 42 additions and 56 deletions

View File

@@ -1,9 +1,8 @@
if (PLUGIN_LZ4)
set(PLUGIN_SOURCES ${PLUGIN_SOURCES}
${xgboost_SOURCE_DIR}/plugin/lz4/sparse_page_lz4_format.cc PARENT_SCOPE)
target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/lz4/sparse_page_lz4_format.cc)
target_link_libraries(objxgboost PUBLIC lz4)
endif (PLUGIN_LZ4)
if (PLUGIN_DENSE_PARSER)
set(PLUGINS_SOURCES ${PLUGINS_SOURCES}
${xgboost_SOURCE_DIR}/plugin/dense_parser/dense_libsvm.cc PARENT_SCOPE)
target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/dense_parser/dense_libsvm.cc)
endif (PLUGIN_DENSE_PARSER)