Skip to content

Commit

Permalink
CMakeLists.txt: protobuf is only needed for tests
Browse files Browse the repository at this point in the history
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 mapbox#109

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine committed Feb 16, 2022
1 parent f379578 commit 1c16d3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ endif()
#
#-----------------------------------------------------------------------------

find_package(Protobuf)
if(BUILD_TESTING)
find_package(Protobuf)
endif()


#-----------------------------------------------------------------------------
Expand Down

0 comments on commit 1c16d3f

Please sign in to comment.