From 3ffdd56de2d7f4a7b0ce1237df12ff87b9ef473d Mon Sep 17 00:00:00 2001 From: saleh Date: Fri, 21 Mar 2025 12:59:39 +0100 Subject: [PATCH] The proposed fix for the part number extraction logic from platforminfo utility output on AWS F1 (Ubuntu AMI/2024.1). The proposed logic is to skip the extraction step if `PROGRAM_PLATFORM_PART` is defined beforehand. For example: `set(PROGRAM_PLATFORM_PART "xcvu9p-flga2104-2-e" CACHE INTERNAL "F1 part number")` --- cmake/FindVitis.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/FindVitis.cmake b/cmake/FindVitis.cmake index 9aaa46b..a63c5b1 100644 --- a/cmake/FindVitis.cmake +++ b/cmake/FindVitis.cmake @@ -476,7 +476,7 @@ function(add_vitis_program set(PROGRAM_DEPENDS ${PROGRAM_DEPENDS} ${_PROGRAM_DEPENDS}) # Recover the part name used by the given platform - if(NOT PROGRAM_PLATFORM_PART OR NOT "${${PROGRAM_TARGET}_PLATFORM}" STREQUAL "${PROGRAM_PLATFORM}") + if(((NOT DEFINED PROGRAM_PLATFORM_PART) OR (NOT PROGRAM_PLATFORM_PART)) AND (NOT "${${PROGRAM_TARGET}_PLATFORM}" STREQUAL "${PROGRAM_PLATFORM}")) message(STATUS "Querying Vitis platform for ${PROGRAM_TARGET}.") execute_process(COMMAND ${Vitis_PLATFORMINFO} --platform ${PROGRAM_PLATFORM} -jhardwarePlatform.board.part OUTPUT_VARIABLE PLATFORM_PART) @@ -485,6 +485,7 @@ function(add_vitis_program set(PROGRAM_PLATFORM_PART ${PLATFORM_PART} CACHE INTERNAL "") endif() endif() + message(STATUS "Deduced PROGRAM_PLATFORM_PART: ${PROGRAM_PLATFORM_PART}") if(NOT PROGRAM_PLATFORM_PART) message(WARNING "Xilinx platform ${PROGRAM_PLATFORM} was not found. Please consult \"${Vitis_PLATFORMINFO} -l\" for a list of installed platforms.") else()