-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (47 loc) · 1.68 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
cmake_minimum_required(VERSION 3.13)
project(adcs-onboard-software)
set(CMAKE_CXX_STANDARD 17)
include_directories(${PROJECT_SOURCE_DIR}/inc
${PROJECT_SOURCE_DIR}/lib/etl/include
${PROJECT_SOURCE_DIR}/lib/eigen
${PROJECT_SOURCE_DIR}/lib/SGP4
${PROJECT_SOURCE_DIR}/lib/geomag)
add_library(adcs OBJECT
src/MathFunctions.cpp
# This is completely fine, and it will work
# as long as you don't change
# project(adcs-onboard-software) to
# project(adcs-onboard-software CXX).
# If you want to specify the project language make sure to do
# project(adcs-onboard-software C CXX) instead.
lib/geomag/GeomagVector.c
lib/geomag/Geomag.cpp
src/SatelliteModel.cpp
src/MEKF.cpp
src/Albedo.cpp
src/Bdot.cpp
lib/SGP4/sgp4.cpp
src/Wahba.cpp
src/CSSCompensation.cpp
src/Pointing.cpp
src/PointingTarget.cpp
src/NadirPointing.cpp
src/SunPointing.cpp
src/PointingStrategy.cpp
src/MagnetorquerPlusRW.cpp
src/MagnetorquerOnly.cpp
src/EnvironmentalModel.cpp
src/OrbitalParameters.cpp)
add_executable(adcs-onboard-software main.cpp
$<TARGET_OBJECTS:adcs>)
add_compile_definitions(EIGEN_STACK_ALLOCATION_LIMIT=0)
IF (EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt")
# Gather all the .cpp files corresponding to tests
file(GLOB test_main_SRC "test/*.cpp")
file(GLOB test_SRC "test/**/*.cpp")
add_subdirectory(lib/Catch2)
add_executable(tests $<TARGET_OBJECTS:adcs>
${test_main_SRC}
${test_SRC})
target_link_libraries(tests Catch2::Catch2)
ENDIF ()