diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 53ebe63b4e..8325ba4aaf 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -195,6 +195,7 @@ if (BUILD_UNIT_TEST STREQUAL "ON") if (BUILD_COVERAGE STREQUAL "ON") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif () + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_LOGS") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unittest) endif () diff --git a/core/src/index/CMakeLists.txt b/core/src/index/CMakeLists.txt index 232fa80181..84f61c9aaa 100644 --- a/core/src/index/CMakeLists.txt +++ b/core/src/index/CMakeLists.txt @@ -99,6 +99,7 @@ endif () set(INDEX_INCLUDE_DIRS ${INDEX_INCLUDE_DIRS} PARENT_SCOPE) if (KNOWHERE_BUILD_TESTS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_LOGS") add_subdirectory(unittest) endif ()