Windows: xbtracer supports config-mode protobuf#9633
Conversation
Signed-off-by: thomthehound <thomthehound@gmail.com>
|
@thomthehound is not a repository collaborator. To proceed:
|
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Hi @thomthehound. I am having trouble with this change. It doesn't work correctly with Yocto. I am refactoring xbtracer CMakeLists.txt to remove the protobuf configuration and instead move it to a shared protobuf.cmake, which after many tries now succeeds with Yocto. I will open a PR for this and if good, we can close this one. Please review #9646 |
Redo Xilinx#9633 to (1) refactor messy code to find protobuf in config or module node, (2) work with Yocto builds. This simplifies xbtracer CMakeLists.txt removing the logic behind finding protobuf. Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
Redo Xilinx#9633 to (1) refactor messy code to find protobuf in config or module node, (2) work with Yocto builds. This simplifies xbtracer CMakeLists.txt removing the logic behind finding protobuf. Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
I'm sorry about that, Soren. I was trying to be as cautious as I could, but I do not think it is possible for me to test your Yocto system on my end. Thank you for putting your time into this. The code in #9646 looks like a huge improvement. I tested it out and it works for me, so I'm going to go ahead and close out this PR. |
Redo #9633 to (1) refactor messy code to find protobuf in config or module node, (2) work with Yocto builds. This simplifies xbtracer CMakeLists.txt removing the logic behind finding protobuf. Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
Bug identified while testing PR #9623.
When building xbtracer against static protobuf libraries on Windows, linkage fails due to CMake not reliably picking up the full transitive dependency set required by newer protobuf releases.
Additionally, MSVC emits benign warnings (here treated as errors) from newer protobuf-generated code.
How problem was solved, alternative solutions (if any) and why they were rejected
When available, let protobuf’s own imported CMake target carry its dependencies by using config-mode. Fall back to the existing module-mode shim if necessary.
Slightly broaden the list of MSVC warning suppressions for this (
xbtracer_protobuf) target only.Risks (if any) associated the changes in the commit
Low.
Existing behavior is preserved when protobuf's config package is not present.
What has been tested and how, request additional testing if necessary
Tested by compiling XRT in Windows with
xbtracerenabled by adding the protobuf port, as-per instructions in #9623.No Linux-specific logic was changed, but Linux builds have not been tested.