-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
73 lines (57 loc) · 2.62 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#####################################################################
# Copyright © 2011-2012,
# Marwan Abdellah: <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#####################################################################
#########################################################
#! Minimum required CMake version
#########################################################
cmake_minimum_required(VERSION 2.6)
#########################################################
#! Project name
#########################################################
PROJECT(MaxSubArray)
#########################################################
#! Add CMake customized modules
#########################################################
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
#########################################################
#! Find packages
#########################################################
# @CUDA
INCLUDE(Find_CUDA)
# @CUDA GPU Computing SDK
#INCLUDE(Find_CUDA_SDK)
# @OpenMP
INCLUDE(Find_OpenMP)
# Include directories
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
# CUDA kernels directory
#SET(CUDA_KERNELS_DIR ${CMAKE_SOURCE_DIR}/Kernels)
INCLUDE_DIRECTORIES(${CUDA_KERNELS_DIR})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/inc/)
#INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
#########################################################
#! Compiler Flags
#########################################################
set(CMAKE_C_FLAGS "-fopenmp -fpermissive -fPIC -pthread -pipe -DLINUX -D_BOOL -DREQUIRE_IOSTREAM -Wno-deprecated -fno-gnu-keywords -w")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
#########################################################
#! Generating executable
#########################################################
CUDA_ADD_EXECUTABLE(run.out ex_MaxSubArray.cpp Run.cpp) # Kernels/cuExternsTest.cu)
#########################################################
#! Link the executable against the cuYURI library
#########################################################
#TARGET_LINK_LIBRARIES(run.out MaxSubArray)