From 596e26e723394ee72e5c91b9fa9e8e2e9004a8f6 Mon Sep 17 00:00:00 2001 From: Payam Date: Tue, 18 Feb 2020 16:45:38 -0500 Subject: [PATCH] removing static lib for hip target Change-Id: I401f428469d5c1c03278f20c3c24c69636876f7c [ROCm/hip commit: cb4637c22207c08eb173124e48d3d303112f6518] --- projects/hip/packaging/hip-targets-release.cmake | 2 +- projects/hip/packaging/hip-targets.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/hip/packaging/hip-targets-release.cmake b/projects/hip/packaging/hip-targets-release.cmake index 397f7883bd..147aad8445 100644 --- a/projects/hip/packaging/hip-targets-release.cmake +++ b/projects/hip/packaging/hip-targets-release.cmake @@ -10,7 +10,7 @@ set(CMAKE_IMPORT_FILE_VERSION 1) get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}" REALPATH) get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../" REALPATH) -if(HIP_PLATFORM STREQUAL "hcc") +if(! HIP_RUNTIME STREQUAL "vdi") # Import target "hip::hip_hcc_static" for configuration "Release" set_property(TARGET hip::hip_hcc_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) if(HIP_COMPILER STREQUAL "clang") diff --git a/projects/hip/packaging/hip-targets.cmake b/projects/hip/packaging/hip-targets.cmake index a02d4ca06d..2d9dd2c438 100644 --- a/projects/hip/packaging/hip-targets.cmake +++ b/projects/hip/packaging/hip-targets.cmake @@ -16,10 +16,10 @@ set(CMAKE_IMPORT_FILE_VERSION 1) set(_targetsDefined) set(_targetsNotDefined) set(_expectedTargets) -if(HIP_PLATFORM STREQUAL "hcc") - foreach(_expectedTarget hip:hip_hcc_static hip::hip_hcc hip::host hip::device) -else() +if(HIP_RUNTIME STREQUAL "vdi") foreach(_expectedTarget hip::hip_hcc hip::host hip::device) +else() + foreach(_expectedTarget hip:hip_hcc_static hip::hip_hcc hip::host hip::device) endif() list(APPEND _expectedTargets ${_expectedTarget}) if(NOT TARGET ${_expectedTarget}) @@ -52,7 +52,7 @@ get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}" REALPATH) get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../" REALPATH) # Create imported target hip::hip_hcc_static -if(HIP_PLATFORM STREQUAL "hcc") +if( ! HIP_RUNTIME STREQUAL "vdi") add_library(hip::hip_hcc_static STATIC IMPORTED) endif() @@ -68,7 +68,7 @@ find_path(HSA_HEADER hsa/hsa.h if (HSA_HEADER-NOTFOUND) message (FATAL_ERROR "HSA header not found! ROCM_PATH environment not set") endif() -if(HIP_PLATFORM STREQUAL "hcc") +if(!HIP_RUNTIME STREQUAL "vdi") set_target_properties(hip::hip_hcc_static PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${HSA_HEADER}" INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${HSA_HEADER}")