forked from AdaptiveCpp/AdaptiveCpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
32 lines (24 loc) · 1 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
project(hipsycl-examples)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/../cmake)
find_package(hipSYCL CONFIG REQUIRED)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(NOT HIPSYCL_DEBUG_LEVEL)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(HIPSYCL_DEBUG_LEVEL 3 CACHE INTEGER
"Choose the debug level, options are: 0 (no debug), 1 (print errors), 2 (also print warnings), 3 (also print general information)"
FORCE)
else()
set(HIPSYCL_DEBUG_LEVEL 2 CACHE INTEGER
"Choose the debug level, options are: 0 (no debug), 1 (print errors), 2 (also print warnings), 3 (also print general information)"
FORCE)
endif()
endif()
#add_compile_definitions(HIPSYCL_DEBUG_LEVEL="${HIPSYCL_DEBUG_LEVEL}")
#Use add_definitions for now for older cmake versions
cmake_policy(SET CMP0005 NEW)
add_definitions(-DHIPSYCL_DEBUG_LEVEL=${HIPSYCL_DEBUG_LEVEL})
cmake_minimum_required (VERSION 3.5)
include_directories(${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR})
subdirs(bruteforce_nbody)