-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (44 loc) · 1.35 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
cmake_minimum_required(VERSION 3.18)
# Project Config
# ==============
PROJECT(cudaCompress VERSION 1.0 LANGUAGES CXX CUDA)
## Custom CMake Modules
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(FastMath)
include(MaxErrorWarning)
include(CPM)
## Enforce C++11
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
## Use certain optimization level
#set(CMAKE_CXX_FLAGS_DEBUG -g)
#set(CMAKE_CXX_FLAGS_RELEASE -O3)
## Set the directory where the binaries will be stored
set(EXECUTABLE_OUTPUT_PATH
${PROJECT_BINARY_DIR}/bin
CACHE PATH
"Directory where all executables will be stored"
)
## Set the directory where the libraries will be stored
set(LIBRARY_OUTPUT_PATH
${PROJECT_BINARY_DIR}/lib
CACHE PATH
"Directory where all the libraries will be stored"
)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
#include_directories(${PROJECT_INCLUDE_DIR})
#include_directories(${PROJECT_SOURCE_DIR})
# Dependencies
# ============
find_package(CUDAToolkit REQUIRED)
find_package(OpenMP REQUIRED)
# Subprojects
# ============
add_subdirectory(src/cudaCompress)
add_subdirectory(src/CPU)
add_subdirectory(src/examples)
add_subdirectory(src/cudaVectorCompress)