Fix CMake target clash with Abseil; add “clik_tests”#800
Conversation
|
Thanks for the PR! Could you give a bit more context on this, how is Abseil being used that this causes problems? What we did when the main oneAPI Construction Kit had a |
|
Thanks for the detailed feedback and suggestions! To clarify the context a bit further: we’re using Abseil alongside gRPC in the oneAPI Construction Kit as part of our HAL development process for simulated devices. Specifically, we followed the HAL REFSI tutorial and extended it with our own functionality (Memory access to our simulated device is handled over gRPC). The clik examples work fine with our HAL implementation. When progressing to the ComputeMux stage, which builds more broadly, the CMake configuration fails due to both Abseil and the OCK's test driver defining a target called check. “Are you including clik in an external project that also contains Abseil, or are you including Abseil in clik?” “Would something like that work for clik as well?” Since we are not using gRPC directly in the OCK anymore, and therefore abseil is also not needed, this issue is not relevant for us anymore, yet we are available for questions if you think we can still provide useful information. Thanks again for your response! |
|
Coming back to this, rather than looking at this as a bug in oneAPI Construction Kit, I think this should be considered a bug in abseil-cpp, and others see it the same way: it is causing problems in a bunch of other projects as well, abseil/abseil-cpp#1641. And this seems like it's made unnecessarily complicated: if |
Fix CMake target clash with Abseil; add “clik_tests”
Overview
Abseil 202401 introduces an interface target named check.
Our test driver used the same name, so CMake fails with CMP0002.
This patch adds a new target clik_tests that runs the existing Python test-runner and leaves Abseil’s check untouched.
Reason for change
With the current main branch + Abseil 202401 the build aborts during the configure step, so no one can compile the Construction Kit on an up-to-date toolchain.
Description of change
No other targets, flags or APIs are affected.
Anything else we should know?
Verified on Ubuntu 22.04 with GCC 11, CMake 3.26, Ninja 1.11;
ninja clik_tests completes and all tests pass.
Checklist