mesytec-mnode/src/CMakeLists.txt

22 lines
874 B
Text
Raw Normal View History

set(MVLC_NNG_MNODE_WARN_FLAGS -Wall -Wextra -Wpedantic -Werror=return-type)
2024-12-12 00:31:03 +01:00
add_library(mesytec-mnode mnode_nng.cc mnode_nng_async.cc mnode_nng_proto.cc)
target_include_directories(mesytec-mnode
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/mesytec-mnode)
2024-12-12 00:31:03 +01:00
target_link_libraries(mesytec-mnode PUBLIC nng mnode-proto PRIVATE spdlog)
target_compile_features(mesytec-mnode PRIVATE cxx_std_17)
2024-12-21 01:30:00 +01:00
target_compile_options(mesytec-mnode PRIVATE ${MVLC_NNG_MNODE_WARN_FLAGS})
2024-12-17 18:19:31 +01:00
add_subdirectory(tools)
if (MNODE_BUILD_TESTS)
function (add_mnode_gtest name)
add_executable(test_${name} ${name}.test.cc)
target_link_libraries(test_${name} PRIVATE mesytec-mnode GTest::gtest_main spdlog)
add_test(NAME name COMMAND $<TARGET_FILE:test_${name}>)
endfunction()
add_mnode_gtest(mana)
endif()