зеркало из https://github.com/mozilla/cubeb.git
build(cmake): use system GTest when available
This speeds up compilation times and makes downstream packaging easier.
This commit is contained in:
Родитель
d512bfa07a
Коммит
72f959807d
|
@ -31,6 +31,10 @@ if(NOT COMMAND add_sanitizers)
|
|||
endif()
|
||||
|
||||
if(BUILD_TESTS)
|
||||
find_package(GTest QUIET)
|
||||
if(TARGET GTest::Main)
|
||||
add_library(gtest_main ALIAS GTest::Main)
|
||||
endif()
|
||||
if(NOT TARGET gtest_main)
|
||||
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt")
|
||||
message(FATAL_ERROR "Could not find googletest: run\n\tgit submodule update --init --recursive\nin base git checkout")
|
||||
|
|
Загрузка…
Ссылка в новой задаче