aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/cmd_line.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-30 02:37:27 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-30 03:32:14 +0200
commite928ce51bd8c26742abfd537b054483a18a9689c (patch)
treead3bfcf7b509dbde4681c011237c8bd23ee8583f /src/cmd_line.c
parentfix function names in error messages (diff)
downloadcimple-e928ce51bd8c26742abfd537b054483a18a9689c.tar.gz
cimple-e928ce51bd8c26742abfd537b054483a18a9689c.zip
show git hash with --version
Also, use cmake's configure_file to build string constants in.
Diffstat (limited to 'src/cmd_line.c')
-rw-r--r--src/cmd_line.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd_line.c b/src/cmd_line.c
index 7f437d1..cd1a50a 100644
--- a/src/cmd_line.c
+++ b/src/cmd_line.c
@@ -6,6 +6,7 @@
*/
#include "cmd_line.h"
+#include "const.h"
#include "file.h"
#include "log.h"
@@ -62,7 +63,7 @@ void exit_with_version(void)
{
char *binary = get_current_binary_name();
- printf("%s %s\n", binary ? binary : "prog", VERSION);
+ printf("%s v%s (%s)\n", binary ? binary : "prog", project_version, project_rev);
free(binary);
exit(0);
}