mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
introduce new PORJECT_* macros
This commit is contained in:
parent
2dd2a530a1
commit
789bcea6c1
5 changed files with 18 additions and 7 deletions
|
@ -22,7 +22,10 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
|
||||
project(villas-common CXX)
|
||||
project(villas-common
|
||||
DESCRIPTION "VILLAScommon"
|
||||
LANGUAGES C CXX
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
||||
|
@ -42,3 +45,8 @@ pkg_check_modules(JANSSON IMPORTED_TARGET jansson)
|
|||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(tests)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/villas/config.h
|
||||
)
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#define V 2
|
||||
#endif
|
||||
|
||||
#define PROJECT_URL "@CMAKE_PROJECT_HOMEPAGE_URL@"
|
||||
#define PROJECT_NAME "@CMAKE_PROJECT_DESCRIPTION@"
|
||||
|
||||
/* Paths */
|
||||
#define PLUGIN_PATH PREFIX "/share/villas/node/plugins"
|
||||
#define WEB_PATH PREFIX "/share/villas/node/web"
|
||||
|
@ -55,7 +58,7 @@
|
|||
#define IPPROTO_VILLAS 137
|
||||
#define ETH_P_VILLAS 0xBABE
|
||||
|
||||
#define USER_AGENT "VILLASfpga (" BUILDID ")"
|
||||
#define USER_AGENT PROJECT_NAME " (" BUILDID ")"
|
||||
|
||||
/* Required kernel version */
|
||||
#define KERNEL_VERSION_MAJ 3
|
|
@ -46,12 +46,12 @@ int rt_init(int priority, int affinity)
|
|||
if (priority)
|
||||
rt_set_priority(priority);
|
||||
else
|
||||
warn("You might want to use the 'priority' setting to increase VILLASnode's process priority");
|
||||
warn("You might want to use the 'priority' setting to increase " PROJECT_NAME "'s process priority");
|
||||
|
||||
if (affinity)
|
||||
rt_set_affinity(affinity);
|
||||
else
|
||||
warn("You might want to use the 'affinity' setting to pin VILLASnode to dedicate CPU cores");
|
||||
warn("You might want to use the 'affinity' setting to pin " PROJECT_NAME " to dedicate CPU cores");
|
||||
|
||||
rt_lock_memory();
|
||||
#else
|
||||
|
@ -89,7 +89,7 @@ int rt_set_affinity(int affinity)
|
|||
|
||||
is_isol = kernel_get_cmdline_param("isolcpus", isolcpus, sizeof(isolcpus));
|
||||
if (is_isol) {
|
||||
warn("You should reserve some cores for VILLASnode (see 'isolcpus')");
|
||||
warn("You should reserve some cores for " PROJECT_NAME " (see 'isolcpus')");
|
||||
|
||||
CPU_ZERO(&cset_isol);
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ void log_vprint(struct log *l, const char *lvl, const char *fmt, va_list ap)
|
|||
|
||||
/* Output */
|
||||
#ifdef ENABLE_OPAL_ASYNC
|
||||
OpalPrint("VILLASnode: %s\n", buf);
|
||||
OpalPrint(PROJECT_NAME ": %s\n", buf);
|
||||
#endif
|
||||
if (l->file) {
|
||||
if (l->tty == false)
|
||||
|
|
|
@ -38,7 +38,7 @@ pthread_t main_thread;
|
|||
|
||||
void print_copyright()
|
||||
{
|
||||
printf("VILLASfpga %s (built on %s %s)\n",
|
||||
printf(PROJECT_NAME " %s (built on %s %s)\n",
|
||||
CLR_BLU(BUILDID), CLR_MAG(__DATE__), CLR_MAG(__TIME__));
|
||||
printf(" Copyright 2014-2017, Institute for Automation of Complex Power Systems, EONERC\n");
|
||||
printf(" Steffen Vogel <StVogel@eonerc.rwth-aachen.de>\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue