[build] Make Protobuf optional in CMake build (#7061)

This commit is contained in:
Tyler Veness
2024-09-12 23:44:19 -07:00
committed by GitHub
parent b9409a4bcf
commit d44b651558
77 changed files with 168 additions and 73 deletions

View File

@@ -2,6 +2,9 @@ include(CompileWarnings)
macro(wpilib_add_test name srcdir)
file(GLOB_RECURSE test_src ${srcdir}/*.cpp)
if(NOT WITH_PROTOBUF)
list(FILTER test_src EXCLUDE REGEX "/proto/")
endif()
add_executable(${name}_test ${test_src})
set_property(TARGET ${name}_test PROPERTY FOLDER "tests")
wpilib_target_warnings(${name}_test)