diff --git a/CMakeLists.txt b/CMakeLists.txt index bd832c6e3..33e716cbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ else() add_compile_options(-Wall -Werror) endif() -execute_process( +execute_process( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCH @@ -104,7 +104,7 @@ pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9) pkg_check_modules(RABBITMQ_C IMPORTED_TARGET librabbitmq>=0.8.0) pkg_check_modules(COMEDILIB IMPORTED_TARGET comedilib>=0.11.0) pkg_check_modules(LIBZMQ IMPORTED_TARGET libzmq>=2.2.0) -pkg_check_modules(LIBWEBSOCKETS IMPORTED_TARGET libwebsockets>=2.3.0) +pkg_check_modules(LIBWEBSOCKETS IMPORTED_TARGET REQUIRED libwebsockets>=2.3.0) pkg_check_modules(NANOMSG IMPORTED_TARGET nanomsg) if(NOT NANOMSG_FOUND) pkg_check_modules(NANOMSG IMPORTED_TARGET libnanomsg>=1.0.0) @@ -169,7 +169,7 @@ else() OUTPUT_VARIABLE GIT_REV OUTPUT_STRIP_TRAILING_WHITESPACE ) - + execute_process( COMMAND git rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/include/villas/config_helper.h b/include/villas/config_helper.h index 96bdf704f..af1be6658 100644 --- a/include/villas/config_helper.h +++ b/include/villas/config_helper.h @@ -23,7 +23,10 @@ #pragma once #include + +#ifdef LIBCONFIG_FOUND #include +#endif /* LIBCONFIG_FOUND */ #include @@ -31,11 +34,13 @@ extern "C" { #endif +#ifdef LIBCONFIG_FOUND /* Convert a libconfig object to a jansson object */ json_t *config_to_json(config_setting_t *cfg); /* Convert a jansson object into a libconfig object. */ int json_to_config(json_t *json, config_setting_t *parent); +#endif /* LIBCONFIG_FOUND */ /* Create a JSON object from command line parameters. */ json_t *json_load_cli(int argc, char *argv[]); diff --git a/lib/hook.c b/lib/hook.c index 65ca2340b..54b381a50 100644 --- a/lib/hook.c +++ b/lib/hook.c @@ -30,7 +30,6 @@ #include #include #include -#include int hook_init(struct hook *h, struct hook_type *vt, struct path *p, struct node *n) { diff --git a/lib/node.c b/lib/node.c index 280841523..fbbc8f653 100644 --- a/lib/node.c +++ b/lib/node.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/nodes/CMakeLists.txt b/lib/nodes/CMakeLists.txt index 123523853..b735a6e8e 100644 --- a/lib/nodes/CMakeLists.txt +++ b/lib/nodes/CMakeLists.txt @@ -23,7 +23,7 @@ set(NODE_SRC influxdb.c stats.c - signal_generator.c + signal_generator.c ) if(LIBNL3_ROUTE_FOUND) @@ -31,11 +31,11 @@ if(LIBNL3_ROUTE_FOUND) list(APPEND INCLUDE_DIRS LIBNL3_ROUTE_INCLUDE_DIRS) endif() -if(WITH_IO) +if(LIBNL3_ROUTE_FOUND AND WITH_IO) list(APPEND NODE_SRC test_rtt.c file.c - socket.c + socket.c ) endif() @@ -49,7 +49,7 @@ endif() # Enable shared memory node-type if(HAS_SEMAPHORE AND HAS_MMAN) list(APPEND NODE_SRC shmem.c) - + if(CMAKE_SUSTEM_NAME STREQUAL Linux) list(APPEND LIBRARIES rt) endif() diff --git a/tools/conf2json.cpp b/tools/conf2json.cpp index 1a6a4e275..e5764be4b 100644 --- a/tools/conf2json.cpp +++ b/tools/conf2json.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include