-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
68 lines (58 loc) · 1.9 KB
/
CMakeLists.txt
File metadata and controls
68 lines (58 loc) · 1.9 KB
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
cmake_minimum_required(VERSION 3.10)
project(Compaction-Project)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
# Check if we need to link filesystem library for older compilers
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
set(FILESYSTEM_LIB stdc++fs)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
set(FILESYSTEM_LIB c++fs)
else()
set(FILESYSTEM_LIB "")
endif()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
# add options for each compaction setting
option(USE_NO_COMPACT "Use Logical + No compact method" OFF)
option(USE_DYNAMIC_COMPACT "Use logical + dynamic compact method" OFF)
# check which compaction method was chosen
if (USE_NO_COMPACT)
add_definitions(-Dflag_no_compact)
elseif (USE_DYNAMIC_COMPACT)
add_definitions(-Dflag_dynamic_compact)
else ()
# default to logical_compact
add_definitions(-Dflag_no_compact)
endif ()
add_executable(compaction
main.cpp
profiler.h
base.cpp
hash_table.cpp
data_collection.cpp
compactor.cpp)
# filter operator
add_executable(filter filter_main.cpp
profiler.h
base.cpp
data_collection.cpp
filter_operator.h)
# a pipeline starts with a filter operator.
add_executable(filter_and_join
filters_and_joins.cpp
profiler.h
base.cpp
hash_table.cpp
compactor.cpp
data_collection.cpp
filter_operator.h
negative_feedback.hpp)
# If you have any libraries, you can link them like this:
# target_link_libraries(YourProjectName your_library)
# Link filesystem library if needed for older compilers
if(FILESYSTEM_LIB)
target_link_libraries(compaction ${FILESYSTEM_LIB})
target_link_libraries(filter_and_join ${FILESYSTEM_LIB})
endif()