From d6f6435b88891b54fc454cb6983fbdad62c02c4e Mon Sep 17 00:00:00 2001 From: Ajay GunaShekar <86270081+agunashe@users.noreply.github.com> Date: Fri, 5 Dec 2025 08:42:15 -0800 Subject: [PATCH] SWDEV-526504 - Remove perl dependency in hip/clr build (#964) * SWDEV-1 - Remove perl dependency in hip/clr build * SWDEV-1 - use python3 inplace of perl for formatting date,time --- projects/clr/hipamd/CMakeLists.txt | 4 ++-- projects/clr/hipamd/src/CMakeLists.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index 6d2e03637c..d3fbe208e2 100755 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -85,7 +85,7 @@ endmacro() ############################# # Setup version information ############################# -find_package(Perl REQUIRED) +find_package(Python3 COMPONENTS Interpreter REQUIRED) find_package(Git) set(ENV{HIP_PATH} "") @@ -146,7 +146,7 @@ if(GIT_FOUND) # get date information based on UTC # use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE - execute_process(COMMAND ${PERL_EXECUTABLE} "-MPOSIX=strftime" "-le" "print strftime \'%y%W%w\',gmtime(${HIP_VERSION_UNIXDATE})" + execute_process(COMMAND ${Python3_EXECUTABLE} -c "import time; print(time.strftime('%y%W%w', time.gmtime(${HIP_VERSION_UNIXDATE})))" RESULT_VARIABLE git_result OUTPUT_VARIABLE git_output WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} diff --git a/projects/clr/hipamd/src/CMakeLists.txt b/projects/clr/hipamd/src/CMakeLists.txt index b840f43461..aa8d307688 100644 --- a/projects/clr/hipamd/src/CMakeLists.txt +++ b/projects/clr/hipamd/src/CMakeLists.txt @@ -218,7 +218,6 @@ if(USE_PROF_API) set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/hip_prof_gen.py") set(PROF_API_LOG "${PROJECT_BINARY_DIR}/hip_prof_gen.log.txt") set(PROF_API_NEWHDR "${PROJECT_BINARY_DIR}/new_header.h") - find_package(Python3 COMPONENTS Interpreter REQUIRED) execute_process(COMMAND ${Python3_EXECUTABLE} -c "import CppHeaderParser" RESULT_VARIABLE CPP_HEADER_PARSER