forked from KhronosGroup/SyclParallelSTL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (29 loc) · 1.04 KB
/
CMakeLists.txt
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
37
38
39
40
41
42
43
44
cmake_minimum_required (VERSION 3.2.2)
project (SyclSTL)
enable_testing()
option(PARALLEL_STL_BENCHMARKS "Build the internal benchmarks" OFF)
option(USE_COMPUTECPP "Use ComputeCPP" ON)
message(STATUS " Path to CMAKE source directory: ${CMAKE_SOURCE_DIR} ")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules/)
find_package(Threads REQUIRED)
if (USE_COMPUTECPP)
message(STATUS " Using ComputeCpp CMake")
message(STATUS " Path to ComputeCpp implementation: ${COMPUTECPP_PACKAGE_ROOT_DIR} ")
set(CMAKE_CXX_STANDARD 11)
include(FindOpenCL)
include(FindComputeCpp)
add_definitions(-DSYCL_PSTL_USE_OLD_ALGO)
set(COMPUTECPP_DEVICE_COMPILER_FLAGS "${COMPUTECPP_DEVICE_COMPILER_FLAGS} -DSYCL_PSTL_USE_OLD_ALGO")
include_directories("${COMPUTECPP_INCLUDE_DIRECTORY}")
else()
message(STATUS " Using triSYCL CMake")
include(FindTriSYCL)
endif()
# PSTL specific
include_directories("include")
add_subdirectory (src)
add_subdirectory (examples)
add_subdirectory (tests)
if (PARALLEL_STL_BENCHMARKS)
add_subdirectory (benchmarks)
endif()