CMake 3.28.0-rc1..rc3: FindProtobuf.cmake Regression
Using the following snippet:
add_library("${lib}-proto" STATIC)
file(GLOB_RECURSE protos "${lib}/*.proto")
protobuf_generate(TARGET "${lib}-proto" IMPORT_DIRS ${Protobuf_INCLUDE_DIR} PROTOS ${protos})
target_include_directories("${lib}-proto" PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries("${lib}-proto" PUBLIC protobuf)
CMake 3.27.7
[build] [4/63 6% :: 0.192] cd /build/cpp && /bin/protoc --cpp_out /build/cpp -I /cpp -I /include /cpp/proto/decimal.proto
^^^^^^^
CMake 3.28.0-rc3
[build] [4/63 1% :: 0.144] cd /build/cpp && /bin/protoc --cpp_out :/build/cpp -I /include /cpp/proto/decimal.proto
^
[build] /cpp/proto/decimal.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
Think the diffs come from !8601 (merged)
Edited by Matias Lopez