[libclc] Fix installation w/ ENABLE_RUNTIME_SUBNORMAL (#109926)
The `ARCHIVE` artifact kind is not valid for `install(FILES ...)`. Additionally, install wasn't resolving the target's `TARGET_FILE` properly and was trying to find it in the top-level build directory, rather than in the libclc binary directory. This is because our `TARGET_FILE` properties were being set to relative paths. The cmake behaviour they are trying to mimic - `$<TARGET_FILE:$tgt>` - provides an absolute path. As such this patch updates instances where we set the `TARGET_FILE` property to return an absolute path.
This commit is contained in:
parent
81ba95cefe
commit
9f3728d157
@ -221,8 +221,10 @@ if( ENABLE_RUNTIME_SUBNORMAL )
|
|||||||
TARGET ${file}
|
TARGET ${file}
|
||||||
INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/${file}.ll
|
INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/${file}.ll
|
||||||
)
|
)
|
||||||
install( FILES $<TARGET_PROPERTY:${file},TARGET_FILE> ARCHIVE
|
install(
|
||||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
|
FILES $<TARGET_PROPERTY:${file},TARGET_FILE>
|
||||||
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/clc"
|
||||||
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -426,8 +428,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
|||||||
add_custom_target( ${builtins_opt_lib_tgt}
|
add_custom_target( ${builtins_opt_lib_tgt}
|
||||||
ALL DEPENDS ${builtins_opt_lib_tgt}.bc
|
ALL DEPENDS ${builtins_opt_lib_tgt}.bc
|
||||||
)
|
)
|
||||||
set_target_properties( ${builtins_opt_lib_tgt}
|
set_target_properties( ${builtins_opt_lib_tgt} PROPERTIES
|
||||||
PROPERTIES TARGET_FILE ${builtins_opt_lib_tgt}.bc
|
TARGET_FILE ${CMAKE_CURRENT_BINARY_DIR}/${builtins_opt_lib_tgt}.bc
|
||||||
FOLDER "libclc/Device IR/Opt"
|
FOLDER "libclc/Device IR/Opt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ function(link_bc)
|
|||||||
|
|
||||||
add_custom_target( ${ARG_TARGET} ALL DEPENDS ${ARG_TARGET}.bc )
|
add_custom_target( ${ARG_TARGET} ALL DEPENDS ${ARG_TARGET}.bc )
|
||||||
set_target_properties( ${ARG_TARGET} PROPERTIES
|
set_target_properties( ${ARG_TARGET} PROPERTIES
|
||||||
TARGET_FILE ${ARG_TARGET}.bc
|
TARGET_FILE ${CMAKE_CURRENT_BINARY_DIR}/${ARG_TARGET}.bc
|
||||||
FOLDER "libclc/Device IR/Linking"
|
FOLDER "libclc/Device IR/Linking"
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user