Skip to content

Commit 8443c90

Browse files
committed
Add build switches for benchmark/test
1 parent 04adfc8 commit 8443c90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ option(TD_INSTALL_STATIC_LIBRARIES "Enable installation of static libraries." ON
2929
option(TD_INSTALL_SHARED_LIBRARIES "Enable installation of shared libraries." ON)
3030
option(TD_ENABLE_JNI "Use \"ON\" to enable JNI-compatible TDLib API.")
3131
option(TD_ENABLE_DOTNET "Use \"ON\" to enable generation of C++/CLI or C++/CX TDLib API bindings.")
32+
option(TD_BUILD_BENCHMARK "Use \"OFF\" to disable benchmark" ON)
33+
option(TD_BUILD_TESTING "Use \"OFF\" to disable testing" ON)
3234
if (NOT CMAKE_CROSSCOMPILING)
3335
option(TD_GENERATE_SOURCE_FILES "Use \"ON\" to just generate TDLib source files.")
3436
endif()
@@ -206,14 +208,14 @@ add_subdirectory(sqlite)
206208
set(TDDB_ENABLE_INSTALL ${TD_INSTALL_STATIC_LIBRARIES} CACHE BOOL "" FORCE)
207209
add_subdirectory(tddb)
208210

209-
if (BUILD_TESTING)
211+
if (TD_BUILD_TESTING AND BUILD_TESTING)
210212
add_subdirectory(test)
211213
endif()
212214

213215
set(TDE2E_ENABLE_INSTALL ${TD_INSTALL_STATIC_LIBRARIES} CACHE BOOL "" FORCE)
214216
add_subdirectory(tde2e)
215217

216-
if (NOT CMAKE_CROSSCOMPILING)
218+
if (TD_BUILD_BENCHMARK AND (NOT CMAKE_CROSSCOMPILING))
217219
add_subdirectory(benchmark)
218220
endif()
219221

0 commit comments

Comments
 (0)