From c317decd316a7defcda3bb1a6590c170681ce3c3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 28 Aug 2022 22:39:15 +0200 Subject: docker: shorten command values --- src/CMakeLists.txt | 3 +++ src/const.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 10c7066..c647937 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,9 @@ add_compile_definitions(_GNU_SOURCE) add_compile_definitions(VERSION="${PROJECT_VERSION}") +set(DEFAULT_HOST "127.0.0.1" CACHE STRING "Set the default --host value") +add_compile_definitions(DEFAULT_HOST="${DEFAULT_HOST}") + function(add_my_executable name) list(POP_FRONT ARGV) add_executable("${name}" ${ARGV}) diff --git a/src/const.h b/src/const.h index 53b0364..8ac2e33 100644 --- a/src/const.h +++ b/src/const.h @@ -1,7 +1,9 @@ #ifndef __CONST_H__ #define __CONST_H__ +#ifndef DEFAULT_HOST #define DEFAULT_HOST "127.0.0.1" +#endif #define DEFAULT_PORT "5556" #endif -- cgit v1.2.3