Correctly mark protobuf as required in find_package. (#17021)
At the point at which we call find_package() to locate protobuf, we know that we do, in fact, need it for this build. Given this, we should be marking it as required in the find_package() call so that if it’s not found the configuration phase fails instead of things breaking in potentially strange ways later on during the build itself.
Austin S. Hemmelgarn committed
Feb 22, 2024 at 07:08 UTC
a0d1e7ac696993af1da6f13ce021ced6f126717c
1 file changed
+1
-1
CMakeLists.txt
+1
-1
@@ -555,7 +555,7 @@ if(ENABLE_ACLK OR ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE)
555
set(Protobuf_USE_STATIC_LIBS On)
556
endif()
557
558
- find_package(Protobuf)
558
+ find_package(Protobuf REQUIRED)
559
endif()
560
561
set(ENABLE_PROTOBUF True)