From bc062e961cc7cf882239b18a18d4d98a0799857d Mon Sep 17 00:00:00 2001 From: Talha Can Havadar Date: Mon, 25 May 2026 14:29:40 +0200 Subject: [PATCH] xbmgmt2: use XBMGMT2_NAME in XRT_EDGE target_compile_definitions The XRT_EDGE branch of xbmgmt2/CMakeLists.txt references ${XBUTIL2_NAME} when calling target_compile_definitions. That variable is defined in the sibling xbutil2/CMakeLists.txt and is not visible in this directory scope, so it expands to an empty string. CMake then parses the call as target_compile_definitions(PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION) and fails the configure step with: Cannot specify compile definitions for target "PRIVATE" which is not built by this project. The non-edge branch above already uses the correct ${XBMGMT2_NAME}. Replace the ${XBUTIL2_NAME} reference with ${XBMGMT2_NAME} so the compile definition is applied to the xbmgmt executable built in this directory. Fixes: #9829 Signed-off-by: Talha Can Havadar --- src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt b/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt index 3528a74d6d2..94e4f52f789 100644 --- a/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt +++ b/src/runtime_src/core/tools/xbmgmt2/CMakeLists.txt @@ -65,7 +65,7 @@ add_executable(${XBMGMT2_NAME} ${XBMGMT_V2_SRCS}) if (NOT XRT_EDGE) target_compile_definitions(${XBMGMT2_NAME} PRIVATE ENABLE_NATIVE_SUBCMDS_AND_REPORTS) else() - target_compile_definitions(${XBUTIL2_NAME} PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION) + target_compile_definitions(${XBMGMT2_NAME} PRIVATE ENABLE_DEFAULT_ONE_DEVICE_OPTION) endif() # Static build is a Linux / Ubuntu option only