Remove libhip_device.a static library
Move remaining function definitions from device_util.cpp to hip_runtime.h header. We can now remove the static library completely as device_util.cpp was the last file part of target hip::hip_device .
This commit is contained in:
@@ -41,15 +41,5 @@ endif()
|
||||
list(APPEND _IMPORT_CHECK_TARGETS hip::hip_hcc )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_hip::hip_hcc "/opt/rocm/hip/lib/libhip_hcc.so" )
|
||||
|
||||
# Import target "hip::hip_device" for configuration "Release"
|
||||
set_property(TARGET hip::hip_device APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(hip::hip_device PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "/opt/rocm/hip/lib/libhip_device.a"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS hip::hip_device )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_hip::hip_device "/opt/rocm/hip/lib/libhip_device.a" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
|
||||
@@ -16,7 +16,7 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
set(_targetsDefined)
|
||||
set(_targetsNotDefined)
|
||||
set(_expectedTargets)
|
||||
foreach(_expectedTarget hip::hip_hcc_static hip::hip_hcc hip::hip_device hip::host hip::device)
|
||||
foreach(_expectedTarget hip::hip_hcc_static hip::hip_hcc hip::host hip::device)
|
||||
list(APPEND _expectedTargets ${_expectedTarget})
|
||||
if(NOT TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsNotDefined ${_expectedTarget})
|
||||
@@ -57,14 +57,6 @@ set_target_properties(hip::hip_hcc PROPERTIES
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/opt/rocm/hsa/include"
|
||||
)
|
||||
|
||||
# Create imported target hip::hip_device
|
||||
add_library(hip::hip_device STATIC IMPORTED)
|
||||
|
||||
set_target_properties(hip::hip_device PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/opt/rocm/hsa/include"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/opt/rocm/hsa/include"
|
||||
)
|
||||
|
||||
# Create imported target hip::host
|
||||
add_library(hip::host INTERFACE IMPORTED)
|
||||
|
||||
@@ -75,13 +67,13 @@ set_target_properties(hip::host PROPERTIES
|
||||
# Create imported target hip::device
|
||||
add_library(hip::device INTERFACE IMPORTED)
|
||||
|
||||
if(HIP_COMPILER STREQUAL "clang")
|
||||
if(HIP_COMPILER STREQUAL "hcc")
|
||||
set_target_properties(hip::device PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "hip::host;hip::hip_device"
|
||||
INTERFACE_LINK_LIBRARIES "hip::host;hcc::hccrt;hcc::hc_am"
|
||||
)
|
||||
else()
|
||||
set_target_properties(hip::device PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "hip::host;hip::hip_device;hcc::hccrt;hcc::hc_am"
|
||||
INTERFACE_LINK_LIBRARIES "hip::host"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ project(hip_hcc)
|
||||
|
||||
install(FILES @PROJECT_BINARY_DIR@/libhip_hcc.so DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/libhip_hcc_static.a DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/libhip_device.a DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/.hipInfo DESTINATION lib)
|
||||
install(FILES @PROJECT_BINARY_DIR@/hip-config.cmake @PROJECT_BINARY_DIR@/hip-config-version.cmake DESTINATION lib/cmake/hip)
|
||||
install(FILES @hip_SOURCE_DIR@/packaging/hip-targets.cmake @hip_SOURCE_DIR@/packaging/hip-targets-release.cmake DESTINATION lib/cmake/hip)
|
||||
|
||||
Reference in New Issue
Block a user