-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (25 loc) · 900 Bytes
/
CMakeLists.txt
File metadata and controls
36 lines (25 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.4.3)
project(test_application)
set(SRC_FILES
"src/main.cpp"
"src/program.cpp")
set(SYCL_FILES
"src/main.cpp")
set(HEADER_FILES
"src/program.h")
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/cmake")
set(ComputeCpp_DIR CACHE STRING "NOT-FOUND")
if (NOT ComputeCpp_DIR)
message(FATAL_ERROR
"SYCL implementation root not provided, please specify "
"the path to the root of the chosen SYCL implementation using "
"ComputeCpp_DIR=<path/to/install/root>.")
endif()
find_package(ComputeCpp REQUIRED)
add_executable("${PROJECT_NAME}" "${SRC_FILES}" "${HEADER_FILES}")
target_include_directories("${PROJECT_NAME}" PRIVATE
"${ComputeCpp_INCLUDE_DIRS}"
"${CMAKE_SOURCE_DIR}/src")
add_sycl_to_target(TARGET "${PROJECT_NAME}"
SOURCES "${SYCL_FILES}")