8000 Unable to point to a static, offline copy of dependencies · Issue #2740 · oneapi-src/unified-runtime · GitHub
[go: up one dir, main page]

Skip to content
Unable to point to a static, offline copy of dependencies #2740
Open
@bwarden

Description

@bwarden

In order to package this software for a distribution, or any software that requires it as part of its own build (such as DPC++ Compiler), it is essential that all necessary source code can be downloaded and provided offline, such that the build will not attempt to retrieve anything from the internet.

# Sparse fetch only the dir with level zero headers for experimental features to avoid pulling in the entire compute-runtime.
FetchContentSparse_Declare(exp-headers ${UR_COMPUTE_RUNTIME_REPO} "${UR_COMPUTE_RUNTIME_TAG}" "level_zero/include")
FetchContent_GetProperties(exp-headers)
if(NOT exp-headers_POPULATED)
FetchContent_Populate(exp-headers)
endif()
add_library(ComputeRuntimeLevelZero-Headers INTERFACE)
set(COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE "${exp-headers_SOURCE_DIR}/../..")
message(STATUS "Level Zero Adapter: Using Level Zero headers from ${COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE}")
target_include_directories(ComputeRuntimeLevelZero-Headers
INTERFACE "$<BUILD_INTERFACE:${COMPUTE_RUNTIME_LEVEL_ZERO_INCLUDE}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)

Ideally, cmake's own methods such as find_package should be used, but lacking that, I should be able to provide variables that point to wherever I have unpacked compute-runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    level-zeroL0 adapter specific issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0