mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
do not copy compiler libraries during build
Instead of doing copy we can use LD_LIBRARY_PATH and use files from original location Change-Id: I3e936370da6a29fbeb00bdb4b324c13572e5ba47 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
3f690e1758
commit
04c2064382
@ -265,7 +265,9 @@ else()
|
||||
set(IGDRCL__IGC_TARGETS "${IGC__IGC_TARGETS}")
|
||||
foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
|
||||
list(APPEND IGDRCL__IGC_INCLUDE_DIR $<TARGET_PROPERTY:${TARGET_tmp},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
list(APPEND IGDRCL__IGC_LIBRARY_PATH $<TARGET_FILE_DIR:${TARGET_tmp}>)
|
||||
endforeach(TARGET_tmp)
|
||||
string(REPLACE ";" ":" IGDRCL__IGC_LIBRARY_PATH "${IGDRCL__IGC_LIBRARY_PATH}")
|
||||
message(STATUS "IGC targets: ${IGDRCL__IGC_TARGETS}")
|
||||
endif()
|
||||
|
||||
@ -695,7 +697,7 @@ include(package.cmake)
|
||||
add_subdirectory(scripts/lint)
|
||||
|
||||
configure_file(config.h.in ${IGDRCL_BUILD_DIR}/config.h)
|
||||
if(NOT IGDRCL__IGC_FOUND)
|
||||
if(WIN32 AND NOT IGDRCL__IGC_FOUND)
|
||||
configure_file(igc.opencl.h.in ${IGDRCL_BUILD_DIR}/igc.opencl.h)
|
||||
endif()
|
||||
configure_file(driver_version.h.in ${IGDRCL_BUILD_DIR}/driver_version.h) # Put Driver version into define
|
||||
|
@ -104,12 +104,14 @@ set_target_properties(ocloc PROPERTIES FOLDER "offline_compiler")
|
||||
add_custom_target(copy_compiler_files DEPENDS ${IGDRCL__IGC_TARGETS})
|
||||
set_target_properties(copy_compiler_files PROPERTIES FOLDER "opencl runtime")
|
||||
|
||||
foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
|
||||
add_custom_command(
|
||||
TARGET copy_compiler_files
|
||||
PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc>
|
||||
)
|
||||
endforeach()
|
||||
if(WIN32)
|
||||
foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
|
||||
add_custom_command(
|
||||
TARGET copy_compiler_files
|
||||
PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc>
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(CLOC_SRCS_LIB ${CLOC_SRCS_LIB} PARENT_SCOPE)
|
||||
|
Reference in New Issue
Block a user