From 1c16d3ffccd9e415c6ea3681f23231cd5184043c Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 16 Feb 2022 00:11:38 +0100 Subject: [PATCH] CMakeLists.txt: protobuf is only needed for tests Don't check for protobuf if tests are disabled. As a side effect, this will avoid a build failure if clang-tidy and protobuf are found but tests are disabled Fix #109 Signed-off-by: Fabrice Fontaine --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b975d490..df2ca15f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,9 @@ endif() # #----------------------------------------------------------------------------- -find_package(Protobuf) +if(BUILD_TESTING) + find_package(Protobuf) +endif() #-----------------------------------------------------------------------------