Skip to content
Snippets Groups Projects
Commit 4757c15c authored by kongr45gpen's avatar kongr45gpen
Browse files

Merge branch 'cmake-org' into 'master'

Better organisation of CMake project

See merge request acubesat/obc/ecss-services!9
parents a2c12996 38106d9c
No related branches found
No related tags found
No related merge requests found
...@@ -13,21 +13,32 @@ add_custom_target(check ...@@ -13,21 +13,32 @@ add_custom_target(check
COMMAND ./clang-tidy.sh COMMAND ./clang-tidy.sh
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci") WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci")
# Specify the .cpp files common across all targets
add_library(common OBJECT
src/Message.cpp
src/Services/MemoryManagementService.cpp
src/Services/ParameterService.cpp
src/Services/RequestVerificationService.cpp
src/Services/TestService.cpp
)
# Specify the .cpp files for the executables # Specify the .cpp files for the executables
add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp add_executable(ecss_services
src/Services/TestService.cpp src/Services/RequestVerificationService.cpp src/main.cpp
src/Services/MemoryManagementService.cpp src/Services/ParameterService.cpp $<TARGET_OBJECTS:common>
src/Services/TestService.cpp src/Platform/x86/Service.cpp
src/Services/RequestVerificationService.cpp) )
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")
IF(EXISTS "${PROJECT_SOURCE_DIR}/lib/Catch2/CMakeLists.txt")
add_subdirectory(lib/Catch2) add_subdirectory(lib/Catch2)
add_executable(tests src/Message.cpp src/Services/TestService.cpp add_executable(tests
src/Services/RequestVerificationService.cpp src/Services/ParameterService.cpp $<TARGET_OBJECTS:common>
src/Services/MemoryManagementService.cpp test/tests.cpp test/Message.cpp ${test_main_SRC}
test/TestPlatform.cpp test/Services/TestService.cpp ${test_SRC})
test/Services/RequestVerificationService.cpp
test/Services/ParameterService.cpp test/Services/MemoryManagementService.cpp)
target_link_libraries(tests Catch2::Catch2) target_link_libraries(tests Catch2::Catch2)
ENDIF() ENDIF()
This folder contains platform-specific files:
- **x86**: Files to be run on a PC with a proper operating system
\ No newline at end of file
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment