SWDEV-445669 - Made required changes to test static libs

Change-Id: I0fbcdaa9f0b9633d861300c221ac12df1772c6e9
This commit is contained in:
Ioannis Assiouras
2024-04-29 20:02:58 +01:00
parent cb8f7860c3
commit 8a24059131
4 changed files with 38 additions and 8 deletions
+1
View File
@@ -22,6 +22,7 @@ cmake_minimum_required(VERSION 3.16.8)
project(hip-samples)
option(ENABLE_ADDRESS_SANITIZER "Option to enable ASAN build" OFF)
option(BUILD_SHARED_LIBS "Use this option to link with shared hip runtime libraries" ON)
# Read -DROCM_Path and env{ROCM_PATH}
if(NOT DEFINED ROCM_PATH)
+12 -3
View File
@@ -37,7 +37,11 @@ if(NOT DEFINED CPACK_INSTALL_PREFIX)
set(CPACK_INSTALL_PREFIX "/opt/rocm/")
endif()
set(PKG_NAME hip-samples)
if(BUILD_SHARED_LIBS)
set(PKG_NAME hip-samples)
else()
set(PKG_NAME hip-samples-static)
endif()
set(CPACK_PACKAGE_NAME ${PKG_NAME})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [HIP SAMPLES]")
set(CPACK_PACKAGE_DESCRIPTION "HIP:
@@ -52,8 +56,13 @@ set(CPACK_RPM_SPEC_MORE_DEFINE "%global __os_install_post %{nil}")
set (CPACK_RPM_PACKAGE_AUTOREQ 0)
# to remove hip-samples-* package during uninstallation of rocm
set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core, hip-runtime-amd")
set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core, hip-runtime-amd")
if(BUILD_SHARED_LIBS)
set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core, hip-runtime-amd")
set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core, hip-runtime-amd")
else()
set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core, hip-static-dev")
set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core, hip-static-devel")
endif()
if(NOT WIN32)
install(DIRECTORY ${SAMPLES_SRC}