-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (30 loc) · 1.04 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
cmake_minimum_required(VERSION 3.0)
set(CMAKE_C_COMPILER "mpicc")
set(CMAKE_C_FLAGS "-O3 -std=c11 -Werror -Wall -Wextra -pedantic") # -fsanitize=address")
project(DistributedMalloc)
find_package(MPI REQUIRED)
# Vars with files for compilation
set(SRCS
src/utils/utils.c
src/cli/cli.c
src/network/message.c
src/network/block.c
src/network/node.c
src/utils/command_queue.c
src/graph/graph.c
src/graph/map.c
src/network/leader.c
src/network/leader_election.c
src/utils/debug.c
src/cli/user.c
src/network/communication.c
src/network/data_communication.c
src/utils/queue.c src/network/leader_utils.c)
set(MAIN src/main/main.c)
set(TEST_MAIN test/main_test.c)
set(FAILURE_DEMO demo/main_election_with_failures.c)
include_directories("include/")
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
add_executable(dmalloc ${SRCS} ${MAIN} ${MPI_C_LIBRARIES})
add_executable(test_dmalloc ${SRCS} ${TEST_MAIN} ${MPI_C_LIBRARIES})
add_executable(failure_demo ${SRCS} ${FAILURE_DEMO} ${MPI_C_LIBRARIES})