Support skipping non-essential parts of the build

This commit is contained in:
Andrea Cavalli 2020-08-23 17:33:49 +02:00
parent 8c0ce47f61
commit 066d664c64

View File

@ -301,9 +301,13 @@ add_subdirectory(sqlite)
add_subdirectory(tddb)
option(TD_SKIP_TEST "Use \"ON\" to skip building/running the test harness.")
if (NOT TD_SKIP_TEST)
add_subdirectory(test)
endif()
if (NOT CMAKE_CROSSCOMPILING)
option(TD_SKIP_BENCHMARK "Use \"ON\" to skip building/running the benchmarks.")
if (NOT CMAKE_CROSSCOMPILING AND NOT TD_SKIP_BENCHMARK)
add_subdirectory(benchmark)
endif()
@ -917,6 +921,8 @@ endif()
#EXECUTABLES
if (NOT CMAKE_CROSSCOMPILING)
option(TD_SKIP_TG_CLI "Use \"ON\" to skip building tg_cli.")
if (NOT CMAKE_CROSSCOMPILING AND NOT TD_SKIP_TG_CLI)
add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE})
if (NOT READLINE_FOUND)