Skip to content

Commit

Permalink
Make cpptest build on Ubuntu (apache#2798)
Browse files Browse the repository at this point in the history
  • Loading branch information
apivovarov authored and wweic committed Mar 20, 2019
1 parent abbdca8 commit a4a6095
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ if(GTEST_LIB)
add_executable(${__execname} ${__srcpath})
list(APPEND TEST_EXECS ${__execname})
target_link_libraries(${__execname}
tvm ${GTEST_LIB} pthread)
tvm ${GTEST_LIB} pthread dl)
set_target_properties(${__execname} PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(${__execname} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
endforeach()
Expand Down
7 changes: 4 additions & 3 deletions docs/contribute/pull_request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ C++
TVM_ROOT=`pwd`
# you need to install google test first, gtest will be installed to $TVM_ROOT/lib
apt-get install -y libgtest-dev
CACHE_PREFIX=. make -f 3rdparty/dmlc-core/scripts/packages.mk gtest
mkdir build
cd build
GTEST_LIB=$TVM_ROOT/lib cmake ..
make cpptest -j
GTEST_LIB=$TVM_ROOT/lib cmake -DUSE_LLVM=ON ..
make cpptest -j$(nproc)
for test in *_test; do
./$test || exit -1
./$test
done
Python
Expand Down

0 comments on commit a4a6095

Please sign in to comment.