mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
cmake: more fixes
This commit is contained in:
parent
8d3a140f4f
commit
15c3f04c5d
3 changed files with 14 additions and 9 deletions
|
@ -119,7 +119,7 @@ cmake_dependent_option(WITH_HOOKS "Build with support for processing h
|
|||
cmake_dependent_option(WITH_WEB "Build with internal webserver" ON "LIBWEBSOCKETS_FOUND" OFF)
|
||||
cmake_dependent_option(WITH_API "Build with remote control API" ON "" OFF)
|
||||
cmake_dependent_option(WITH_CONFIG "Build with support for libconfig configuration syntax" ON "LIBCONFIG_FOUND" OFF)
|
||||
cmake_dependent_option(WITH_SRC "Build villas-* executables" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_SRC "Build executables" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_TOOLS "Build auxilary tools" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_TESTS "Run tests" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_PLUGINS "Build plugins" ON "TOPLEVEL_PROJECT" OFF)
|
||||
|
@ -197,6 +197,7 @@ add_feature_info(HOOKS WITH_HOOKS "Build with
|
|||
add_feature_info(WEB WITH_WEB "Build with internal webserver")
|
||||
add_feature_info(API WITH_API "Build with remote control API")
|
||||
add_feature_info(CONFIG WITH_CONFIG "Build with support for libconfig configuration syntax")
|
||||
add_feature_info(SRC WITH_SRC "Build executables")
|
||||
add_feature_info(TOOLS WITH_TOOLS "Build auxilary tools")
|
||||
add_feature_info(TESTS WITH_TESTS "Run tests")
|
||||
add_feature_info(PLUGINS WITH_PLUGINS "Build plugins")
|
||||
|
|
|
@ -69,10 +69,12 @@ static void usage()
|
|||
<< " -h show this help" << std::endl
|
||||
<< " -V show the version of the tool" << std::endl << std::endl;
|
||||
|
||||
#ifdef WITH_HOOKS
|
||||
std::cout << "Supported hooks:" << std::endl;
|
||||
for (Plugin *p : Registry::lookup<HookFactory>())
|
||||
std::cout << " - " << p->getName() << ": " << p->getDescription() << std::endl;
|
||||
std::cout << std::endl;
|
||||
#endif /* WITH_HOOKS */
|
||||
|
||||
std::cout << "Supported IO formats:" << std::endl;
|
||||
plugin_dump(PLUGIN_TYPE_FORMAT);
|
||||
|
|
|
@ -28,12 +28,14 @@ if(CRITERION_FOUND)
|
|||
add_subdirectory(unit)
|
||||
endif()
|
||||
|
||||
set(VALGRIND "valgrind --leak-check=full --show-leak-kinds=all --suppressions=${CMAKE_CURRENT_SOURCE_DIR}/valgrind.supp")
|
||||
if(WITH_SRC AND WITH_HOOKS)
|
||||
set(VALGRIND "valgrind --leak-check=full --show-leak-kinds=all --suppressions=${CMAKE_CURRENT_SOURCE_DIR}/valgrind.supp")
|
||||
|
||||
add_custom_target(run-valgrind
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-node> & sleep 2; kill %1
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-pipe> -t 2 ${PROJECT_SOURCE_DIR}/etc/websocket-loopback.conf ws1
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-signal> mixed -v 4 -l 10
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-hook> stats < <($<TARGET_FILE:villas-signal> mixed -l 5)
|
||||
)
|
||||
add_dependencies(run-valgrind villas-node villas-pipe villas-signal villas-hook)
|
||||
add_custom_target(run-valgrind
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-node> & sleep 2; kill %1
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-pipe> -t 2 ${PROJECT_SOURCE_DIR}/etc/websocket-loopback.conf ws1
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-signal> mixed -v 4 -l 10
|
||||
COMMAND ${VALGRIND} $<TARGET_FILE:villas-hook> stats < <($<TARGET_FILE:villas-signal> mixed -l 5)
|
||||
)
|
||||
add_dependencies(run-valgrind villas-node villas-pipe villas-signal villas-hook)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue