把 centos 的测试编译彻底关掉
This commit is contained in:
parent
82e143c8df
commit
cf8ccf077b
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user