From 8c212e3abb7f4343affeb5e9e1092b59d3b74075 Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Tue, 6 May 2014 17:51:47 +0200 Subject: Added reporting of version number to all program and stream file --- src/pattern_sim.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/pattern_sim.c') diff --git a/src/pattern_sim.c b/src/pattern_sim.c index b8cc1c68..fca12bab 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -40,6 +40,7 @@ #include #include +#include "version.h" #include "image.h" #include "diffraction.h" #include "diffraction-gpu.h" @@ -65,6 +66,7 @@ static void show_help(const char *s) "pulses of X-rays from a free electron laser.\n" "\n" " -h, --help Display this help message.\n" +" --version Print CrystFEL version number and exit.\n" "\n" " -p, --pdb= PDB file from which to get the unit cell.\n" " (The actual Bragg intensities come from the\n" @@ -261,6 +263,7 @@ int main(int argc, char *argv[]) /* Long options */ const struct option longopts[] = { {"help", 0, NULL, 'h'}, + {"version", 0, NULL, 7 }, {"gpu", 0, &config_gpu, 1}, {"random-orientation", 0, NULL, 'r'}, {"number", 1, NULL, 'n'}, @@ -297,6 +300,11 @@ int main(int argc, char *argv[]) show_help(argv[0]); return 0; + case 7 : + printf("CrystFEL: " CRYSTFEL_VERSIONSTRING "\n"); + printf(CRYSTFEL_BOILERPLATE"\n"); + return 0; + case 'r' : config_randomquat = 1; break; -- cgit v1.2.3