Skip to content
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

Look for ocloc-<version> executable. #1339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions cmake/Modules/FindSYCLToolkit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ function(SYCL_CMPLR_TEST_BUILD error TEST_SRC_FILE TEST_EXE)
# Verify if test case build properly.
if(result)
message("SYCL: feature test compile failed!!")
message("SYCL_COMPILER SYCL_CXX_FLAGS_LIST TEST_SRC_FILE!!")
message("${SYCL_COMPILER} ${SYCL_CXX_FLAGS_LIST} ${TEST_SRC_FILE} !!")
message("OUTPUT_FILE ${SYCL_CMPLR_TEST_DIR}/Compile.log ")
message("compile output is: ${output}")
endif()

Expand Down
9 changes: 7 additions & 2 deletions cmake/SYCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ if(${ver_line_num} EQUAL 1)
endif()

# offline compiler of SYCL compiler
set(IGC_OCLOC_VERSION)
find_program(OCLOC_EXEC ocloc)
if((DEFINED ENV{OCLOC_VERSION}) AND NOT ("$ENV{OCLOC_VERSION}" STREQUAL ""))
set(IGC_OCLOC_VERSION "$ENV{OCLOC_VERSION}")
else()
set(IGC_OCLOC_VERSION)
endif()
find_program(OCLOC_EXEC NAMES ocloc-${IGC_OCLOC_VERSION} ocloc)
if(OCLOC_EXEC)
message(STATUS "ocloc binary ${OCLOC_EXEC} version ${IGC_OCLOC_VERSION}")
set(drv_ver_file "${PROJECT_BINARY_DIR}/OCL_DRIVER_VERSION")
file(REMOVE ${drv_ver_file})
execute_process(COMMAND ${OCLOC_EXEC} query OCL_DRIVER_VERSION WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
Expand Down