diff --git a/cmake/Modules/FindSYCLToolkit.cmake b/cmake/Modules/FindSYCLToolkit.cmake index 88edd34a7..62a5e0383 100644 --- a/cmake/Modules/FindSYCLToolkit.cmake +++ b/cmake/Modules/FindSYCLToolkit.cmake @@ -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() diff --git a/cmake/SYCL.cmake b/cmake/SYCL.cmake index 819cb0ef4..2b59185ce 100644 --- a/cmake/SYCL.cmake +++ b/cmake/SYCL.cmake @@ -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})