Remove unused RABIT targets. (#6110)

* Remove rabit mock.
* Remove rabit base.
This commit is contained in:
Jiaming Yuan 2020-09-11 14:09:44 +08:00 committed by GitHub
parent c92d751ad1
commit 07945290a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 18 deletions

View File

@ -177,7 +177,7 @@ else()
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
endif (MSVC)
endif(RABIT_MOCK)
foreach(lib rabit rabit_base rabit_mock rabit_mock_static)
foreach(lib rabit rabit_mock_static)
# Explicitly link dmlc to rabit, so that configured header (build_config.h)
# from dmlc is correctly applied to rabit.
if (TARGET ${lib})

View File

@ -4,13 +4,11 @@ find_package(Threads REQUIRED)
add_library(rabit src/allreduce_base.cc src/allreduce_robust.cc src/engine.cc src/c_api.cc)
add_library(rabit_mock_static src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc)
add_library(rabit_mock SHARED src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc)
target_link_libraries(rabit Threads::Threads dmlc)
target_link_libraries(rabit_mock_static Threads::Threads dmlc)
target_link_libraries(rabit_mock Threads::Threads dmlc)
set(rabit_libs rabit rabit_mock rabit_mock_static)
set_target_properties(rabit rabit_mock rabit_mock_static
set(rabit_libs rabit rabit_mock_static)
set_target_properties(rabit rabit_mock_static
PROPERTIES CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
POSITION_INDEPENDENT_CODE ON)

View File

@ -1,13 +0,0 @@
/*!
* Copyright (c) 2014 by Contributors
* \file engine_mock.cc
* \brief this is an engine implementation that will
* insert failures in certain call point, to test if the engine is robust to failure
* \author Tianqi Chen
*/
// define use MOCK, os we will use mock Manager
#define NOMINMAX
#include <rabit/base.h>
// switch engine to AllreduceMock
#define RABIT_USE_BASE
#include "engine.cc"