-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
96 lines (67 loc) · 1.28 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.16)
project(senseBox C)
set(CMAKE_C_STANDARD 99)
find_package(CURL REQUIRED)
# Release
add_executable(
senseBox
extern/bme280/bme280.c
src/config.c
src/sensor.c
src/connection.c
src/tools.c
src/main.c
)
target_compile_definitions(
senseBox
PRIVATE SEND_DATA=1
PRIVATE SHORT_SLEEP=0
)
target_include_directories(
senseBox
PRIVATE extern/bme280
PRIVATE src
)
target_link_libraries(
senseBox
PRIVATE curl
)
# Tests
add_executable(
Tests
extern/Unity/src/unity.c
extern/Unity/extras/fixture/src/unity_fixture.c
extern/Unity/extras/memory/src/unity_memory.c
extern/bme280/bme280.c
src/config.c
src/sensor.c
src/connection.c
src/tools.c
test/config_test.c
test/sensor_test.c
test/connection_test.c
test/tools_test.c
test/main_test.c
)
target_compile_definitions(
Tests
PRIVATE TESTS=1
)
target_include_directories(
Tests
PRIVATE extern/Unity/src
PRIVATE extern/Unity/extras/fixture/src
PRIVATE extern/Unity/extras/memory/src
PRIVATE extern/bme280
PRIVATE src
PRIVATE test
)
target_compile_options(
Tests
PRIVATE --coverage
)
target_link_libraries(
Tests
PRIVATE gcov
PRIVATE curl
)