From fd15d507f22d160bd774159c4bdb442343eae0af Mon Sep 17 00:00:00 2001 From: Sven Date: Fri, 14 May 2021 14:00:22 +0800 Subject: [PATCH] remove unit test file with regex (#42) Signed-off-by: xiang.zhang --- src/tim/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tim/CMakeLists.txt b/src/tim/CMakeLists.txt index 6208d9c..8edfee7 100644 --- a/src/tim/CMakeLists.txt +++ b/src/tim/CMakeLists.txt @@ -28,9 +28,14 @@ if(ENABLE_LAYOUT_INFER) ${LAYOUT_INFER_FRAMEWORK_SRCS} ${LAYOUT_INFER_OP_SRCS} ) - list(REMOVE_ITEM SRC ./transform/layout_inference_test.cc) endif() +foreach(src_file ${SRC}) + if(${src_file} MATCHES ".*_test\.cc") + list(REMOVE_ITEM SRC ${src_file}) + endif() +endforeach() + add_library(${TARGET_NAME} SHARED ${SRC}) target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive tim_internal -Wl,--no-whole-archive)