Skip to content

[SYCL] Correctly track dependencies when using check-sycl target #3964

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

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 3 additions & 3 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,9 @@ if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/count)
add_subdirectory(utils/not)
add_subdirectory(utils/yaml-bench)
if( LLVM_INCLUDE_TESTS )
add_subdirectory(utils/unittest)
endif()
else()
if ( LLVM_INCLUDE_TESTS )
message(FATAL_ERROR "Including tests when not building utils will not work.
Expand Down Expand Up @@ -1000,9 +1003,6 @@ if( LLVM_INCLUDE_TESTS )
add_subdirectory(utils/lit)
add_subdirectory(test)
add_subdirectory(unittests)
if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/unittest)
endif()

if (WIN32)
# This utility is used to prevent crashing tests from calling Dr. Watson on
Expand Down
8 changes: 5 additions & 3 deletions sycl/cmake/modules/AddSYCLExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ macro(add_sycl_executable ARG_TARGET_NAME)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND_EXPAND_LISTS)
add_dependencies(${ARG_TARGET_NAME}_exec sycl-toolchain)
foreach(_lib in ${ARG_LIBRARIES})
if (TARGET _lib)
add_dependencies(${ARG_TARGET_NAME}_exec _lib)
foreach(_lib ${ARG_LIBRARIES})
if (TARGET ${_lib})
add_dependencies(${ARG_TARGET_NAME}_exec ${_lib})
else()
message(WARNING "${_lib} is not know to CMake.")
endif()
endforeach()

Expand Down
1 change: 1 addition & 0 deletions sycl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ list(APPEND SYCL_TEST_DEPS
llvm-config
llvm-cxxdump
llvm-readobj
llvm-dis
)

list(APPEND SYCL_DEPLOY_TEST_DEPS
Expand Down