37 lines
1.5 KiB
CMake
37 lines
1.5 KiB
CMake
set(MY_WARN_FLAGS -Wall -Wextra -Wpedantic)
|
|
|
|
find_package(Threads)
|
|
|
|
# Bit of a hack to set the variables here. If set earlier clang-tidy will for
|
|
# some reason pickup log.c and warn about some va_list stuff. Might be because
|
|
# log.c is in the source directory as the same does not happen with the imgui
|
|
# object library. TODO: move logc to externals.
|
|
#find_program(CLANG_TIDY_EXECUTABLE clang-tidy)
|
|
#if (CLANG_TIDY_EXECUTABLE)
|
|
# set(CMAKE_C_CLANG_TIDY clang-tidy -p ${CMAKE_BINARY_DIR} --extra-arg=-std=c11)
|
|
# set(CMAKE_CXX_CLANG_TIDY clang-tidy -p ${CMAKE_BINARY_DIR} --extra-arg=-std=c++17)
|
|
#endif()
|
|
|
|
#add_library(dp_common dp_common.c)
|
|
#target_compile_features(dp_common PRIVATE c_std_11)
|
|
#target_compile_options(dp_common PUBLIC ${DP_WARN_FLAGS}) # spread warning flags
|
|
#target_link_libraries(dp_common
|
|
# PUBLIC logc
|
|
# PUBLIC nng
|
|
# PUBLIC Threads::Threads
|
|
#)
|
|
#target_include_directories(dp_common INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_executable(pair_producer pair_producer.cc)
|
|
target_compile_features(pair_producer PRIVATE cxx_std_17)
|
|
target_link_libraries(pair_producer PRIVATE mesytec-mvlc PRIVATE nng)
|
|
target_compile_options(pair_producer PRIVATE ${MY_WARN_FLAGS})
|
|
|
|
add_executable(pair_consumer pair_consumer.cc)
|
|
target_compile_features(pair_consumer PRIVATE cxx_std_17)
|
|
target_link_libraries(pair_consumer PRIVATE mesytec-mvlc PRIVATE nng)
|
|
target_compile_options(pair_consumer PRIVATE ${MY_WARN_FLAGS})
|
|
|
|
|
|
#unset(CMAKE_C_CLANG_TIDY)
|
|
#unset(CMAKE_CXX_CLANG_TIDY)
|