Skip to content

[UR] Ensure mock target depends on UR_EXTERNAL_DEPENDENCIES #18844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion unified-runtime/scripts/check-hardening.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ for file in $1/lib/*.so; do
*/libOpenCL*)
# This is not built as part of UR
true;;
*/libzeCallMap.so | */libur_mock_headers.so)
*/libzeCallMap.so | */libur_mock.so)
# Only used in testing, and are too simple for many of the hardening flags to have an effect.
true;;
*)
Expand Down
12 changes: 6 additions & 6 deletions unified-runtime/source/mock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

add_library (ur_mock_headers SHARED
"${CMAKE_CURRENT_SOURCE_DIR}/ur_mock_helpers.cpp")

target_include_directories(ur_mock_headers
add_ur_library(ur_mock SHARED
"${CMAKE_CURRENT_SOURCE_DIR}/ur_mock_helpers.cpp"
)
target_include_directories(ur_mock
INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}"
)

target_link_libraries(ur_mock_headers PRIVATE
target_link_libraries(ur_mock PRIVATE
${PROJECT_NAME}::headers
)

add_library(${PROJECT_NAME}::mock ALIAS ur_mock_headers)
add_library(${PROJECT_NAME}::mock ALIAS ur_mock)