Remove redundant FindGTest.cmake. (#3533)

During removal of FindGTest.cmake, also

* Fix gtest include dirs.
* Remove some blanks and use PWD for gtest dir.
This commit is contained in:
trivialfis
2018-08-07 06:08:08 +08:00
committed by Rory Mitchell
parent 69454d9487
commit 55caad6e49
4 changed files with 15 additions and 93 deletions

View File

@@ -6,7 +6,7 @@ rm -rf gtest
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
cmake . && make
cmake . && make
mkdir lib && mv libgtest.a lib
cd ..
rm -rf release-1.7.0.zip*
@@ -14,7 +14,7 @@ rm -rf release-1.7.0.zip*
rm -rf build
mkdir build
cd build
cmake .. "$@" -DGOOGLE_TEST=ON -DGTEST_ROOT=../gtest
cmake .. "$@" -DGOOGLE_TEST=ON -DGTEST_ROOT=$PWD/../gtest
make clean
make -j
cd ..

View File

@@ -125,16 +125,17 @@ if [ ${TASK} == "cmake_test" ]; then
rm -rf release-1.7.0.zip
# Build/test without AVX
rm -rf build
mkdir build && cd build
cmake .. -DGOOGLE_TEST=ON -DGTEST_ROOT=../gtest/
cmake .. -DGOOGLE_TEST=ON -DGTEST_ROOT=$PWD/../gtest/
make
cd ..
./testxgboost
rm -rf build
# Build/test with AVX
mkdir build && cd build
cmake .. -DGOOGLE_TEST=ON -DUSE_AVX=ON -DGTEST_ROOT=../gtest/
cmake .. -DGOOGLE_TEST=ON -DUSE_AVX=ON -DGTEST_ROOT=$PWD/../gtest/
make
cd ..
./testxgboost