From ca490bfe31e2cf7c7ff0d4a074659f537daa5907 Mon Sep 17 00:00:00 2001 From: Payam Date: Fri, 28 Feb 2020 17:54:29 -0500 Subject: [PATCH] updated hip-targets for VDI Change-Id: I268f1dbf04e3439ca1f3dd1cfbbc2f40667c00f9 [ROCm/hip commit: e638f9afba924c961711a91fd87a92fc10facd41] --- .../hip/packaging/hip-targets-release.cmake | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/projects/hip/packaging/hip-targets-release.cmake b/projects/hip/packaging/hip-targets-release.cmake index 942f4f3be7..90fd961184 100644 --- a/projects/hip/packaging/hip-targets-release.cmake +++ b/projects/hip/packaging/hip-targets-release.cmake @@ -28,32 +28,31 @@ if(NOT HIP_RUNTIME MATCHES "VDI") list(APPEND _IMPORT_CHECK_TARGETS hip::hip_hcc_static ) list(APPEND _IMPORT_CHECK_FILES_FOR_hip::hip_hcc_static "${_IMPORT_PREFIX}/lib/libhip_hcc_static.a" ) -endif() -# Import target "hip::hip_hcc" for configuration "Release" -set_property(TARGET hip::hip_hcc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -if(HIP_COMPILER STREQUAL "clang") - if(HIP_RUNTIME MATCHES "VDI") - set_target_properties(hip::amdhip64 PROPERTIES - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libamdhip64.so" - IMPORTED_SONAME_RELEASE "libamdhip64.so") + # Import target "hip::hip_hcc" for configuration "Release" + set_property(TARGET hip::hip_hcc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + if(HIP_COMPILER STREQUAL "clang") + set_target_properties(hip::hip_hcc PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libhip_hcc.so" + IMPORTED_SONAME_RELEASE "libhip_hcc.so") else() set_target_properties(hip::hip_hcc PROPERTIES + IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "hcc::hccrt;hcc::hc_am" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libhip_hcc.so" IMPORTED_SONAME_RELEASE "libhip_hcc.so") endif() -else() - set_target_properties(hip::hip_hcc PROPERTIES - IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "hcc::hccrt;hcc::hc_am" - IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libhip_hcc.so" - IMPORTED_SONAME_RELEASE "libhip_hcc.so") -endif() - -if(NOT HIP_RUNTIME MATCHES "VDI") list(APPEND _IMPORT_CHECK_TARGETS hip::hip_hcc ) list(APPEND _IMPORT_CHECK_FILES_FOR_hip::hip_hcc "${_IMPORT_PREFIX}/lib/libhip_hcc.so" ) + else() + + set_property(TARGET hip::amdhip64 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(hip::amdhip64 PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libamdhip64.so" + IMPORTED_SONAME_RELEASE "libamdhip64.so") list(APPEND _IMPORT_CHECK_TARGETS hip::amdhip64) list(APPEND _IMPORT_CHECK_FILES_FOR_hip::amdhip64 "${_IMPORT_PREFIX}/lib/libamdhip64.so" ) + endif() + # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION)