-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
202 lines (185 loc) · 9.98 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
cmake_minimum_required(VERSION 3.6)
project(RaidZeroLib)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20 -Wall -Wextra -Wshadow -Wnull-dereference -Wno-psabi -Wno-unused-function -pthread -g -O0 -fprofile-arcs -ftest-coverage -D THREADS_STD")
enable_testing()
# Download and unpack googletest at configure time
configure_file(CMakeLists.txt.in external-dependencies/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external-dependencies )
if(result)
message(FATAL_ERROR "CMake step for dependencies failed: ${result}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external-dependencies )
if(result)
message(FATAL_ERROR "Build step for dependencies failed: ${result}")
endif()
# Prevent overriding the parent project's compiler/linker
# settings on Windows
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
# Add googletest directly to our build. This defines
# the gtest and gtest_main targets.
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
${CMAKE_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
endforeach()
include_directories(include)
add_executable(RaidZeroLib
include/okapi/api/chassis/controller/chassisController.hpp
include/okapi/api/chassis/controller/chassisControllerIntegrated.hpp
include/okapi/api/chassis/controller/chassisControllerPid.hpp
include/okapi/api/chassis/controller/chassisScales.hpp
include/okapi/api/chassis/controller/odomChassisController.hpp
include/okapi/api/chassis/controller/defaultOdomChassisController.hpp
include/okapi/api/chassis/model/chassisModel.hpp
include/okapi/api/chassis/model/hDriveModel.hpp
include/okapi/api/chassis/model/readOnlyChassisModel.hpp
include/okapi/api/chassis/model/skidSteerModel.hpp
include/okapi/api/chassis/model/threeEncoderSkidSteerModel.hpp
include/okapi/api/chassis/model/threeEncoderXDriveModel.hpp
include/okapi/api/chassis/model/xDriveModel.hpp
include/okapi/api/control/async/asyncController.hpp
include/okapi/api/control/async/asyncLinearMotionProfileController.hpp
include/okapi/api/control/async/asyncMotionProfileController.hpp
include/okapi/api/control/async/asyncPosIntegratedController.hpp
include/okapi/api/control/async/asyncPositionController.hpp
include/okapi/api/control/async/asyncPosPidController.hpp
include/okapi/api/control/async/asyncVelIntegratedController.hpp
include/okapi/api/control/async/asyncVelocityController.hpp
include/okapi/api/control/async/asyncVelPidController.hpp
include/okapi/api/control/async/asyncWrapper.hpp
include/okapi/api/control/iterative/iterativeController.hpp
include/okapi/api/control/iterative/iterativeMotorVelocityController.hpp
include/okapi/api/control/iterative/iterativePositionController.hpp
include/okapi/api/control/iterative/iterativePosPidController.hpp
include/okapi/api/control/iterative/iterativeVelocityController.hpp
include/okapi/api/control/iterative/iterativeVelPidController.hpp
include/okapi/api/control/util/controllerRunner.hpp
include/okapi/api/control/util/flywheelSimulator.hpp
include/okapi/api/control/util/pathfinderUtil.hpp
include/okapi/api/control/util/pidTuner.hpp
include/okapi/api/control/util/settledUtil.hpp
include/okapi/api/control/closedLoopController.hpp
include/okapi/api/control/controllerInput.hpp
include/okapi/api/control/controllerOutput.hpp
include/okapi/api/control/offsettableControllerInput.hpp
include/okapi/api/device/button/abstractButton.hpp
include/okapi/api/device/button/buttonBase.hpp
include/okapi/api/device/motor/abstractMotor.hpp
include/okapi/api/device/rotarysensor/continuousRotarySensor.hpp
include/okapi/api/device/rotarysensor/rotarySensor.hpp
include/okapi/api/filter/averageFilter.hpp
include/okapi/api/filter/composableFilter.hpp
include/okapi/api/filter/demaFilter.hpp
include/okapi/api/filter/ekfFilter.hpp
include/okapi/api/filter/emaFilter.hpp
include/okapi/api/filter/filter.hpp
include/okapi/api/filter/filteredControllerInput.hpp
include/okapi/api/filter/medianFilter.hpp
include/okapi/api/filter/passthroughFilter.hpp
include/okapi/api/filter/velMath.hpp
include/okapi/api/odometry/odometry.hpp
include/okapi/api/odometry/twoEncoderOdometry.hpp
include/okapi/api/odometry/odomMath.hpp
include/okapi/api/odometry/threeEncoderOdometry.hpp
include/okapi/api/units/QAcceleration.hpp
include/okapi/api/units/QAngle.hpp
include/okapi/api/units/QAngularAcceleration.hpp
include/okapi/api/units/QAngularJerk.hpp
include/okapi/api/units/QAngularSpeed.hpp
include/okapi/api/units/QArea.hpp
include/okapi/api/units/QForce.hpp
include/okapi/api/units/QFrequency.hpp
include/okapi/api/units/QJerk.hpp
include/okapi/api/units/QLength.hpp
include/okapi/api/units/QMass.hpp
include/okapi/api/units/QPressure.hpp
include/okapi/api/units/QSpeed.hpp
include/okapi/api/units/QTime.hpp
include/okapi/api/units/QTorque.hpp
include/okapi/api/units/QVolume.hpp
include/okapi/api/units/RQuantity.hpp
include/okapi/api/util/abstractRate.hpp
include/okapi/api/util/logging.hpp
include/okapi/api/util/timeUtil.hpp
include/okapi/api/util/abstractTimer.hpp
include/okapi/api/util/mathUtil.hpp
include/okapi/api/util/supplier.hpp
include/okapi/api/coreProsAPI.hpp
include/okapi/api/odometry/point.hpp
include/okapi/api/odometry/stateMode.hpp
include/okapi/api/odometry/odomState.hpp
include/RaidZeroLib/api/Control/Async/AsyncVelBangBangController.hpp
include/RaidZeroLib/api/Control/Async/AsyncVelTBHController.hpp
include/RaidZeroLib/api/Control/Iterative/IterativeVelTBHController.hpp
include/RaidZeroLib/api/Control/Iterative/IterativeVelBangBangController.hpp
include/RaidZeroLib/api/Control/Feedforward/FeedforwardController.hpp
include/RaidZeroLib/api/Control/Feedforward/SimpleMotorFeedforward.hpp
include/RaidZeroLib/api/Chassis/AdaptivePurePursuitController.hpp
include/RaidZeroLib/api/Utility/StateMachine.hpp
include/RaidZeroLib/api/Utility/Util.hpp
include/RaidZeroLib/api/Utility/CrossPlatformThread.hpp
include/RaidZeroLib/api/Utility/CrossPlatformMutex.hpp
include/RaidZeroLib/api/Utility/Math.hpp
include/RaidZeroLib/api/Pathing/DiscretePath.hpp
include/RaidZeroLib/api/Pathing/ParametricPath.hpp
include/RaidZeroLib/api/Pathing/CubicBezier.hpp
include/RaidZeroLib/api/Pathing/PiecewiseCubicBezier.hpp
include/RaidZeroLib/api/Trajectory/MotionProfile/TrapezoidalMotionProfile.hpp
include/RaidZeroLib/api/Trajectory/MotionProfile/MotionProfile.hpp
include/RaidZeroLib/api/Filter/SlewRate.hpp
include/RaidZeroLib/api/Geometry/CoordinateAxis.hpp
include/RaidZeroLib/api/Geometry/CoordinateRotation.hpp
include/RaidZeroLib/api/Geometry/CoordinateSystem.hpp
include/RaidZeroLib/api/Geometry/Point.hpp
include/RaidZeroLib/api/Geometry/Rotation.hpp
include/RaidZeroLib/api/Geometry/Transform.hpp
include/RaidZeroLib/api/Geometry/Twist.hpp
include/RaidZeroLib/api/Geometry/Pose.hpp
include/RaidZeroLib/api/Units/Units.hpp
include/RaidZeroLib/api.hpp
src/RaidZeroLib/api/Control/Async/AsyncVelTBHController.cpp
src/RaidZeroLib/api/Control/Async/AsyncVelBangBangController.cpp
src/RaidZeroLib/api/Control/Iterative/IterativeVelTBHController.cpp
src/RaidZeroLib/api/Control/Iterative/IterativeVelBangBangController.cpp
src/RaidZeroLib/api/Control/Feedforward/SimpleMotorFeedforward.cpp
src/RaidZeroLib/api/Chassis/AdaptivePurePursuitController.cpp
src/RaidZeroLib/api/Utility/CrossPlatformMutex.cpp
src/RaidZeroLib/api/Utility/Math.cpp
src/RaidZeroLib/api/Utility/CrossPlatformThread.cpp
src/RaidZeroLib/api/Pathing/ParametricPath.cpp
src/RaidZeroLib/api/Pathing/DiscretePath.cpp
src/RaidZeroLib/api/Pathing/CubicBezier.cpp
src/RaidZeroLib/api/Pathing/PiecewiseCubicBezier.cpp
src/RaidZeroLib/api/Filter/SlewRate.cpp
src/RaidZeroLib/api/Geometry/CoordinateSystem.cpp
src/RaidZeroLib/api/Geometry/Twist.cpp
src/RaidZeroLib/api/Geometry/Point.cpp
src/RaidZeroLib/api/Geometry/Transform.cpp
src/RaidZeroLib/api/Geometry/Rotation.cpp
src/RaidZeroLib/api/Geometry/CoordinateAxis.cpp
src/RaidZeroLib/api/Geometry/CoordinateRotation.cpp
src/RaidZeroLib/api/Geometry/Pose.cpp
test/test/Control/Feedforward/SimpleMotorFeedforwardTest.cpp
test/test/Control/Iterative/IterativeVelBangBangControllerTest.cpp
test/test/Geometry/RotationTest.cpp
test/test/Geometry/PointTest.cpp
test/test/Geometry/TwistTest.cpp
test/test/Geometry/TransformTest.cpp
test/test/Geometry/PoseTest.cpp
test/test/Pathing/DiscretePathTest.cpp
test/test/Pathing/ParametricPathTest.cpp
test/test/Pathing/CubicBezierTest.cpp
test/test/Pathing/PiecewiseCubicBezierTest.cpp
test/test/Units/UnitsTest.cpp
test/test/Utility/MathTest.cpp
test/test/Utility/StateMachineTest.cpp
test/include/mocks.hpp
test/src/mocks.cpp)
# Link against gtest and okapi
target_link_libraries(RaidZeroLib ${CMAKE_SOURCE_DIR}/test/firmware/OkapiLibTest.a gtest_main)