把 centos 的测试编译彻底关掉

This commit is contained in:
Tian jianyong 2024-12-20 17:21:24 +08:00
parent 82e143c8df
commit cf8ccf077b

View File

@ -99,7 +99,11 @@ add_executable(${PROJECT_NAME} src/main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_lib)
#
option(BUILD_TESTS "Build test cases" ON)
if(APPLE)
option(BUILD_TESTS "Build test cases" ON)
else()
option(BUILD_TESTS "Build test cases" OFF)
endif()
#
if(BUILD_TESTS AND EXISTS "${CMAKE_SOURCE_DIR}/tests")