feat(ds18b20-ds2480): добавь драйвер датчиков через UART-мост
This commit is contained in:
17
c/ds18b20-ds2480/CMakeLists.txt
Normal file
17
c/ds18b20-ds2480/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(ds18b20_ds2480 C)
|
||||
add_library(ds18b20_ds2480 STATIC ds2480.c ds18b20_ds2480.c)
|
||||
target_include_directories(ds18b20_ds2480 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_features(ds18b20_ds2480 PUBLIC c_std_99)
|
||||
if(MSVC)
|
||||
target_compile_options(ds18b20_ds2480 PRIVATE /W4)
|
||||
else()
|
||||
target_compile_options(ds18b20_ds2480 PRIVATE -Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
option(DS18B20_DS2480_BUILD_TESTS "Build host tests" ON)
|
||||
if(DS18B20_DS2480_BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_executable(test_ds18b20_ds2480 tests/test_ds18b20_ds2480.c)
|
||||
target_link_libraries(test_ds18b20_ds2480 PRIVATE ds18b20_ds2480)
|
||||
add_test(NAME ds18b20_ds2480 COMMAND test_ds18b20_ds2480)
|
||||
endif()
|
||||
Reference in New Issue
Block a user