[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:
committed by
GitHub
parent
22a31b1faa
commit
0d411b0397
@@ -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)
|
||||
|
||||
@@ -156,7 +156,7 @@ inline void CompressArray<DType>::Write(dmlc::Stream* fo) {
|
||||
}
|
||||
|
||||
template<typename StorageIndex>
|
||||
class SparsePageLZ4Format : public SparsePageFormat {
|
||||
class SparsePageLZ4Format : public SparsePageFormat<SparsePage> {
|
||||
public:
|
||||
explicit SparsePageLZ4Format(bool use_lz4_hc)
|
||||
: use_lz4_hc_(use_lz4_hc) {
|
||||
|
||||
Reference in New Issue
Block a user