1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-07 23:33:52 +00:00

Prefer BUILD_TESTING over CLI11_TESTING if defined

This commit is contained in:
Aleksey Mikhaylov 2018-12-14 19:20:37 +00:00 committed by Henry Schreiner
parent bd4dc91184
commit 0387f35ec8

View File

@ -156,6 +156,10 @@ endif()
cmake_dependent_option(CLI11_SINGLE_FILE_TESTS "Duplicate all the tests for a single file build" OFF "CLI11_SINGLE_FILE" OFF)
cmake_dependent_option(CLI11_TESTING "Build the tests and add them" ON "CUR_PROJ" OFF)
if(DEFINED BUILD_TESTING)
cmake_dependent_option(CLI11_TESTING "" ON "BUILD_TESTING" OFF)
message(STATUS "BUILD_TESTING is defined and it supersedes CLI11_TESTING. Has forced to ${CLI11_TESTING}")
endif()
if(CLI11_TESTING)
enable_testing()
add_subdirectory(tests)