-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (31 loc) · 916 Bytes
/
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(rcm)
INCLUDE(cmake/SBELUtils.cmake)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
enable_cuda_support()
MESSAGE(STATUS "Cuda version: ${CUDA_VERSION}")
SET(RCM_HEADERS
rcm/common.h
rcm/rcm.h
rcm/rcm_um.h
rcm/exception.h
rcm/timer.h
)
SET(RCM_CUHEADERS
rcm/device/kernels.cuh
)
SET(MMIO_FILES
mm_io/mm_io.h
mm_io/mm_io.c
)
SOURCE_GROUP("Headers" FILES ${RCM_HEADERS})
SOURCE_GROUP("CUDA Headers" FILES ${RCM_CUHEADERS})
SOURCE_GROUP("MM_IO" FILES ${MMIO_FILES})
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
)
IF(NOT (${CUDA_VERSION} VERSION_LESS "6.0"))
cuda_add_executable(driver_um driver_um.cu ${RCM_HEADERS} ${RCM_CUHEADERS} ${MMIO_FILES})
cuda_add_executable(testing testing.cu ${RCM_HEADERS} ${RCM_CUHEADERS} ${MMIO_FILES})
cuda_add_executable(testing_um testing_um.cu ${RCM_HEADERS} ${RCM_CUHEADERS} ${MMIO_FILES})
ENDIF()