File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.2 )
1+ cmake_minimum_required (VERSION 3.14 )
22
33project (sycl-solution)
44# Requirements
@@ -184,6 +184,35 @@ install(DIRECTORY ${OPENCL_INCLUDE}/CL
184184 COMPONENT opencl-headers
185185)
186186
187+ # vc-intrinsics could have been added earlier from llvm/projects
188+ if (NOT TARGET LLVMGenXIntrinsics)
189+ if (NOT DEFINED LLVMGenXIntrinsics_SOURCE_DIR)
190+ message (STATUS "vc-intrinsics are missing. Will try to download them from github.com" )
191+
192+ include (FetchContent)
193+ FetchContent_Declare(vc-intrinsics
194+ GIT_REPOSITORY https://github.com/intel/vc-intrinsics.git
195+ GIT_TAG cce6e48c28eb850d7dadd30841c0d95f009bbca1
196+ )
197+ FetchContent_MakeAvailable(vc-intrinsics)
198+ FetchContent_GetProperties(vc-intrinsics)
199+
200+ set (LLVMGenXIntrinsics_SOURCE_DIR ${vc-intrinsics_SOURCE_DIR})
201+ set (LLVMGenXIntrinsics_BINARY_DIR ${vc-intrinsics_BINARY_DIR })
202+ else ()
203+ # -DLLVMGenXIntrinsics_SOURCE_DIR is provided
204+ message (STATUS "vc-intrinsics are added manually ${LLVMGenXIntrinsics_SOURCE_DIR} " )
205+
206+ set (LLVMGenXIntrinsics_BINARY_DIR ${CMAKE_BINARY_DIR} /vc-intrinsics-build )
207+ add_subdirectory (${LLVMGenXIntrinsics_SOURCE_DIR} ${LLVMGenXIntrinsics_BINARY_DIR} )
208+ endif ()
209+
210+ target_include_directories (LLVMGenXIntrinsics
211+ PUBLIC $<BUILD_INTERFACE:${LLVMGenXIntrinsics_SOURCE_DIR} /GenXIntrinsics/include >
212+ PUBLIC $<BUILD_INTERFACE:${LLVMGenXIntrinsics_BINARY_DIR} /GenXIntrinsics/include >
213+ )
214+ endif ()
215+
187216option (SYCL_BUILD_PI_CUDA
188217 "Enables the CUDA backend for the Plugin Interface" OFF )
189218
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ and a wide range of compute accelerators such as GPU and FPGA.
2222## Prerequisites
2323
2424* ` git ` - [ Download] ( https://git-scm.com/downloads )
25- * ` cmake ` version 3.2 or later - [ Download] ( http://www.cmake.org/download/ )
25+ * ` cmake ` version 3.14 or later - [ Download] ( http://www.cmake.org/download/ )
2626* ` python ` - [ Download] ( https://www.python.org/downloads/release/python-2716/ )
2727* ` ninja ` -
2828[ Download] ( https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages )
You can’t perform that action at this time.
0 commit comments