Add WITH_BENCHMARKS to decide whether to compile benchmarks

Signed-off-by: Contrary <liang.jingchao@zte.com.cn>
This commit is contained in:
Contrary 2025-03-20 22:00:51 +08:00
parent 2aa9564035
commit db5df83eb9

View File

@ -33,6 +33,7 @@ option(SAVE_ALLOCATE_SIZE "Use more memory to save allocate size" OFF)
option(ENABLE_FUSE_APPLICATION "" ON)
option(WITH_TESTS "Enable the build of tests" OFF)
option(WITH_BENCHMARKS "Enable the build of benchmarks" OFF)
if (DEFINED SANITIZER AND SANITIZER)
set(OVERRIDE_CXX_NEW_DELETE OFF)
@ -208,4 +209,6 @@ add_subdirectory(src)
if(WITH_TESTS)
add_subdirectory(tests)
endif()
add_subdirectory(benchmarks)
if(WITH_BENCHMARKS)
add_subdirectory(benchmarks)
endif()