Skip to content

Commit 23a843d

Browse files
authored
[SYCL][CMake] Fix emhash build error (#19967)
We only need to link against `emhash` in build, it's an interface library representing a header-only project (so all linking does is add includes), and it's used internally in `xptifw` source files and in a single non-installed header, but some other part of the code could in theory use that non-installed header during build, so we need to link against it, but only for build. Manually checked the generated CMake code. Issue introduced in #19894 Example [error](https://github.com/intel/llvm/actions/runs/17439817298/job/49520655604?pr=19963): ``` CMake Error: install(EXPORT "unified-runtime-targets" ...) includes target "xptifw" which requires target "emhash" that is not in any export set. ``` Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 777f38d commit 23a843d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xptifw/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function(add_xpti_library LIB_NAME)
6767
$<BUILD_INTERFACE:${XPTI_DIR}/include>
6868
)
6969

70-
target_link_libraries(${LIB_NAME} PUBLIC emhash::emhash)
70+
target_link_libraries(${LIB_NAME} PUBLIC $<BUILD_INTERFACE:emhash::emhash>)
7171

7272
find_package(Threads REQUIRED)
7373
target_link_libraries(${LIB_NAME} PUBLIC ${CMAKE_DL_LIBS} Threads::Threads)

0 commit comments

Comments
 (0)