From e6794047017257865c130eb5f6df9bbfe32d117f Mon Sep 17 00:00:00 2001 From: wxf Date: Thu, 15 Jul 2021 10:32:40 +0800 Subject: [PATCH] =?UTF-8?q?tests:=20=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=90=8D=E7=A7=B0=E8=8E=B7=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7767a23f..23f3cdf2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,7 +8,8 @@ foreach (TEST_SRC ${TEST_SRC_LIST}) continue() endif () endif () - STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC}) + + get_filename_component(TEST_EXE_NAME ${TEST_SRC} NAME_WE) message(STATUS "add test:${TEST_EXE_NAME}") add_executable(${TEST_EXE_NAME} ${TEST_SRC})