From 194ba6880eefbf1607aad7e9a9f906dc92aa954d Mon Sep 17 00:00:00 2001 From: LuoYin Date: Thu, 9 Jul 2020 11:23:26 +0800 Subject: [PATCH] update CMakeLists.txt of unittest_cpp to support Mindspore Build --- tests/unittest_cpp/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unittest_cpp/CMakeLists.txt b/tests/unittest_cpp/CMakeLists.txt index 4c659e2..b28ab09 100644 --- a/tests/unittest_cpp/CMakeLists.txt +++ b/tests/unittest_cpp/CMakeLists.txt @@ -14,4 +14,8 @@ file( add_executable(unittest_main ${UT_CPP_SRC}) -target_link_libraries(unittest_main gtest akg ${TVM_RUNTIME_LINKER_LIBS} ${CMAKE_DL_LIBS}) +if (CMAKE_SYSTEM_NAME MATCHES "Linux") + target_link_libraries(unittest_main PRIVATE gtest akg ${TVM_RUNTIME_LINKER_LIBS} pthread util dl) +else() + target_link_libraries(unittest_main PRIVATE gtest akg ${TVM_RUNTIME_LINKER_LIBS}) +endif() -- GitLab