File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -628,8 +628,27 @@ install(FILES ${HIPRT_ORO_HEADERS}
628628
629629# add hipfb files
630630if (PRECOMPILE AND NOT BAKE_COMPILED_KERNEL)
631- install (FILES ${KERNEL_HIPRT_COMP} ${KERNEL_OROCHI_COMP}
632- DESTINATION bin)
631+ # compile.py also exports the HIPRT bitcode as: hiprt<ver>_<hip>_amd_lib_<os>.bc
632+ get_filename_component (KERNEL_HIPRT_COMP_NAME "${KERNEL_HIPRT_COMP} " NAME )
633+ string (REPLACE "_amd.hipfb" "_amd_lib_${KERNEL_OS_POSTFIX} .bc" KERNEL_HIPRT_BC_NAME "${KERNEL_HIPRT_COMP_NAME} " )
634+
635+ if (CMAKE_CONFIGURATION_TYPES )
636+ # Multi-config generators (e.g. Visual Studio): install from the selected config output folder.
637+ get_filename_component (KERNEL_OROCHI_COMP_NAME "${KERNEL_OROCHI_COMP} " NAME )
638+
639+ install (FILES "${BASE_OUTPUT_DIR} /Debug/${KERNEL_HIPRT_COMP_NAME} " "${BASE_OUTPUT_DIR} /Debug/${KERNEL_OROCHI_COMP_NAME} " "${BASE_OUTPUT_DIR} /Debug/${KERNEL_HIPRT_BC_NAME} "
640+ DESTINATION bin
641+ CONFIGURATIONS Debug)
642+ install (FILES "${BASE_OUTPUT_DIR} /Release/${KERNEL_HIPRT_COMP_NAME} " "${BASE_OUTPUT_DIR} /Release/${KERNEL_OROCHI_COMP_NAME} " "${BASE_OUTPUT_DIR} /Release/${KERNEL_HIPRT_BC_NAME} "
643+ DESTINATION bin
644+ CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
645+ else ()
646+ get_filename_component (KERNEL_HIPRT_COMP_DIR "${KERNEL_HIPRT_COMP} " DIRECTORY )
647+ set (KERNEL_HIPRT_BC "${KERNEL_HIPRT_COMP_DIR} /${KERNEL_HIPRT_BC_NAME} " )
648+
649+ install (FILES ${KERNEL_HIPRT_COMP} ${KERNEL_OROCHI_COMP} ${KERNEL_HIPRT_BC}
650+ DESTINATION bin)
651+ endif ()
633652endif ()
634653
635654
You can’t perform that action at this time.
0 commit comments