From 7323180861ede1cff3621a77b2052856f21119f7 Mon Sep 17 00:00:00 2001 From: Cai Yudong Date: Tue, 5 Apr 2022 12:43:30 +0800 Subject: [PATCH] Move bench to directory unittest (#16386) Signed-off-by: yudong.cai --- internal/core/CMakeLists.txt | 3 --- internal/core/unittest/CMakeLists.txt | 3 +++ internal/core/{ => unittest}/bench/CMakeLists.txt | 0 internal/core/{ => unittest}/bench/bench_indexbuilder.cpp | 0 internal/core/{ => unittest}/bench/bench_naive.cpp | 0 internal/core/{ => unittest}/bench/bench_search.cpp | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename internal/core/{ => unittest}/bench/CMakeLists.txt (100%) rename internal/core/{ => unittest}/bench/bench_indexbuilder.cpp (100%) rename internal/core/{ => unittest}/bench/bench_naive.cpp (100%) rename internal/core/{ => unittest}/bench/bench_search.cpp (100%) diff --git a/internal/core/CMakeLists.txt b/internal/core/CMakeLists.txt index 65915dce74..225d1c7557 100644 --- a/internal/core/CMakeLists.txt +++ b/internal/core/CMakeLists.txt @@ -250,9 +250,6 @@ add_subdirectory( src ) if ( BUILD_UNIT_TEST STREQUAL "ON" ) append_flags( CMAKE_CXX_FLAGS FLAGS "-DELPP_DISABLE_LOGS") add_subdirectory(unittest) - if (LINUX) - add_subdirectory(bench) - endif () endif () add_custom_target( Clean-All COMMAND ${CMAKE_BUILD_TOOL} clean ) diff --git a/internal/core/unittest/CMakeLists.txt b/internal/core/unittest/CMakeLists.txt index 3670d32fd4..a14e992885 100644 --- a/internal/core/unittest/CMakeLists.txt +++ b/internal/core/unittest/CMakeLists.txt @@ -99,3 +99,6 @@ target_link_libraries(all_tests install(TARGETS all_tests DESTINATION unittest) +if (LINUX) + add_subdirectory(bench) +endif () diff --git a/internal/core/bench/CMakeLists.txt b/internal/core/unittest/bench/CMakeLists.txt similarity index 100% rename from internal/core/bench/CMakeLists.txt rename to internal/core/unittest/bench/CMakeLists.txt diff --git a/internal/core/bench/bench_indexbuilder.cpp b/internal/core/unittest/bench/bench_indexbuilder.cpp similarity index 100% rename from internal/core/bench/bench_indexbuilder.cpp rename to internal/core/unittest/bench/bench_indexbuilder.cpp diff --git a/internal/core/bench/bench_naive.cpp b/internal/core/unittest/bench/bench_naive.cpp similarity index 100% rename from internal/core/bench/bench_naive.cpp rename to internal/core/unittest/bench/bench_naive.cpp diff --git a/internal/core/bench/bench_search.cpp b/internal/core/unittest/bench/bench_search.cpp similarity index 100% rename from internal/core/bench/bench_search.cpp rename to internal/core/unittest/bench/bench_search.cpp