-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (33 loc) · 1.37 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
#enable conan package manager
find_package(GTest)
# set the project name
set(SOURCES
"tests.cpp"
"drivers/led.cpp"
"drivers/pulse_engine.cpp"
"drivers/spibus.cpp"
"drivers/equalizer.cpp"
"drivers/motor.cpp"
"drivers/termal_regulator.cpp"
"device/device.cpp"
"device/sdcard.cpp"
"device/file_system.cpp"
"libraries/gcode.cpp"
"libraries/user_interface.cpp"
"solutions/printer.cpp"
"solutions/printer_memory_manager.cpp"
"solutions/gcode_driver.cpp"
"solutions/gcode_driver_acceleration.cpp"
"solutions/configuration_commands.cpp"
"solutions/printer_file_manager.cpp"
"solutions/printer_emulator.h"
"solutions/printer_emulator.cpp")
# add sub-project
add_executable(driver_tests ${SOURCES})
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/resources/model.gcode" "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/model.gcode" COPYONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/resources/wanhao.gcode" "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/wanhao.gcode" COPYONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/resources/pla.mtl" "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/pla.mtl" COPYONLY)
target_link_libraries(driver_tests PUBLIC device_mock drivers libraries solutions fatfs GTest::gtest)
target_include_directories(driver_tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME drivers
COMMAND driver_tests.exe)