Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ add_compile_options(
check_include_file("sys/eventfd.h" HAS_EVENTFD)
check_include_file("semaphore.h" HAS_SEMAPHORE)
check_include_file("sys/mman.h" HAS_MMAN)
check_include_file("netdb.h" HAS_NETDB)
check_include_file("poll.h" HAS_POLL)

# Use the switch NO_EVENTFD to deactivate eventfd usage indepentent of availability on OS
if(${NO_EVENTFD})
Expand Down Expand Up @@ -194,6 +196,7 @@ cmake_dependent_option(WITH_TOOLS "Build auxilary tools"
cmake_dependent_option(WITH_WEB "Build with internal webserver" "${WITH_DEFAULTS}" "LIBWEBSOCKETS_FOUND" OFF)

cmake_dependent_option(WITH_NODE_AMQP "Build with amqp node-type" "${WITH_DEFAULTS}" "RABBITMQ_C_FOUND" OFF)
cmake_dependent_option(WITH_NODE_C37_118 "Build with c37_118 node-type" "${WITH_DEFAULTS}" "HAS_NETDB; HAS_POLL" OFF)
cmake_dependent_option(WITH_NODE_CAN "Build with can node-type" "${WITH_DEFAULTS}" "" OFF)
cmake_dependent_option(WITH_NODE_COMEDI "Build with comedi node-type" "${WITH_DEFAULTS}" "COMEDILIB_FOUND" OFF)
cmake_dependent_option(WITH_NODE_ETHERCAT "Build with ethercat node-type" "${WITH_DEFAULTS}" "ETHERLAB_FOUND; NOT WITHOUT_GPL" OFF)
Expand Down
5 changes: 4 additions & 1 deletion lib/nodes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

set(NODE_SRC
loopback_internal.cpp
c37_118.cpp
)

if(WITH_NODE_C37_118)
list(APPEND NODE_SRC c37_118.cpp)
endif()

if(LIBNL3_ROUTE_FOUND)
list(APPEND LIBRARIES PkgConfig::LIBNL3_ROUTE)
endif()
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/node-c37_118.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

set -e

if ! villas node -h | grep -q '^ - c37\.118\b'; then
echo "The c37.118 node-type is not supported by this build"
exit 99
fi

DIR=$(mktemp -d)
pushd ${DIR}

Expand Down
5 changes: 4 additions & 1 deletion tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# SPDX-License-Identifier: Apache-2.0

set(TEST_SRC
c37_118.cpp
config_json.cpp
config.cpp
format.cpp
Expand All @@ -20,6 +19,10 @@ set(TEST_SRC
signal.cpp
)

if(WITH_NODE_C37_118)
list(APPEND TEST_SRC c37_118.cpp)
endif()

add_executable(unit-tests ${TEST_SRC})
target_link_libraries(unit-tests PUBLIC
PkgConfig::CRITERION
Expand Down
Loading