Handle PyTorch export final version
MODIFY
CMakeLists.txt
CMakeLists.txt
@@ -37,7 +37,6 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-function")
-set(ROCM_EXPORT_PARSE_TARGETS_LIBRARY ON)
# Build options
option(BUILD_TEST "Build tests" ON)

MODIFY
cmake/ROCMExportTargetsHeaderOnly.cmake
cmake/ROCMExportTargetsHeaderOnly.cmake
@@ -95,7 +95,7 @@ function(rocm_export_targets_header_only)
if(PARSE_TARGETS)
rocm_write_package_template_function(${CONFIG_TEMPLATE} include "\${${PACKAGE_NAME}_TARGET_FILE}")
- if(ROCM_EXPORT_PARSE_TARGETS_LIBRARY)
+ if(NOT (DEFINED PYTORCH_FOUND_HIP AND PYTORCH_FOUND_HIP) )
foreach(NAME ${PACKAGE_NAME} ${PACKAGE_NAME_UPPER} ${PACKAGE_NAME_LOWER})
rocm_write_package_template_function(${CONFIG_TEMPLATE} set ${NAME}_LIBRARIES ${PARSE_TARGETS})
rocm_write_package_template_function(${CONFIG_TEMPLATE} set ${NAME}_LIBRARY ${PARSE_TARGETS})

Handle PyTorch export final version