Use bundled gtest (#4900)
* Suggest to use gtest bundled with dmlc * Use dmlc bundled gtest in all CI scripts * Make clang-tidy to use dmlc embedded gtest
This commit is contained in:
committed by
Philip Hyunsu Cho
parent
095de3bf5f
commit
80977182c5
@@ -33,20 +33,11 @@ fi
|
||||
|
||||
if [ ${TASK} == "cmake_test" ]; then
|
||||
set -e
|
||||
# Build gtest via cmake
|
||||
wget -nc https://github.com/google/googletest/archive/release-1.7.0.zip
|
||||
unzip -n release-1.7.0.zip
|
||||
mv googletest-release-1.7.0 gtest && cd gtest
|
||||
CC=gcc-7 CXX=g++-7 cmake . && make
|
||||
mkdir lib && mv libgtest.a lib
|
||||
cd ..
|
||||
rm -rf release-1.7.0.zip
|
||||
|
||||
# Build/test
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
PLUGINS="-DPLUGIN_LZ4=ON -DPLUGIN_DENSE_PARSER=ON"
|
||||
CC=gcc-7 CXX=g++-7 cmake .. -DGOOGLE_TEST=ON -DGTEST_ROOT=$PWD/../gtest/ ${PLUGINS}
|
||||
CC=gcc-7 CXX=g++-7 cmake .. -DGOOGLE_TEST=ON -DUSE_DMLC_GTEST=ON ${PLUGINS}
|
||||
make
|
||||
./testxgboost
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user