forked from CIS565-Fall-2016/Project2-Stream-Compaction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (24 loc) · 787 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
cmake_minimum_required(VERSION 3.0)
project(cis565_stream_compaction_test)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# Enable C++11 for host code
set(CMAKE_CXX_STANDARD 11)
list(APPEND CUDA_NVCC_FLAGS_DEBUG -G -g)
list(APPEND CUDA_NVCC_FLAGS_RELWITHDEBUGINFO -lineinfo)
# Crucial magic for CUDA linking
find_package(Threads REQUIRED)
find_package(CUDA REQUIRED)
set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE ON)
set(CUDA_SEPARABLE_COMPILATION ON)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
endif()
include_directories(.)
add_subdirectory(stream_compaction)
cuda_add_executable(${CMAKE_PROJECT_NAME}
"src/main.cpp"
)
target_link_libraries(${CMAKE_PROJECT_NAME}
stream_compaction
${CORELIBS}
)