Allow folly usages only if TD_TEST_FOLLY is defined.
This commit is contained in:
parent
408aa95f76
commit
1f12b0d8e8
@ -73,6 +73,7 @@ if (NOT WIN32 AND NOT CYGWIN)
|
|||||||
target_link_libraries(bench_queue PRIVATE tdutils)
|
target_link_libraries(bench_queue PRIVATE tdutils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (TD_TEST_FOLLY)
|
||||||
find_package(ABSL QUIET)
|
find_package(ABSL QUIET)
|
||||||
find_package(folly QUIET)
|
find_package(folly QUIET)
|
||||||
find_package(gflags QUIET)
|
find_package(gflags QUIET)
|
||||||
@ -89,3 +90,4 @@ if (ABSL_FOUND AND folly_FOUND)
|
|||||||
add_executable(hashmap-build hashmap_build.cpp)
|
add_executable(hashmap-build hashmap_build.cpp)
|
||||||
target_link_libraries(hashmap-build PRIVATE tdutils Folly::folly absl::flat_hash_map absl::hash)
|
target_link_libraries(hashmap-build PRIVATE tdutils Folly::folly absl::flat_hash_map absl::hash)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
@ -390,6 +390,7 @@ install(TARGETS tdutils EXPORT TdTargets
|
|||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (TD_TEST_FOLLY)
|
||||||
find_package(benchmark QUIET)
|
find_package(benchmark QUIET)
|
||||||
find_package(folly QUIET)
|
find_package(folly QUIET)
|
||||||
find_package(gflags QUIET)
|
find_package(gflags QUIET)
|
||||||
@ -398,3 +399,4 @@ if (ABSL_FOUND AND benchmark_FOUND AND folly_FOUND)
|
|||||||
add_executable(benchmark-hashset test/hashset_benchmark.cpp)
|
add_executable(benchmark-hashset test/hashset_benchmark.cpp)
|
||||||
target_link_libraries(benchmark-hashset PRIVATE tdutils benchmark::benchmark Folly::folly absl::flat_hash_map absl::hash)
|
target_link_libraries(benchmark-hashset PRIVATE tdutils benchmark::benchmark Folly::folly absl::flat_hash_map absl::hash)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user