diff options
author | Thomas White <taw@physics.org> | 2020-07-30 10:25:46 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-30 11:15:53 +0200 |
commit | 1e5af53a425162fe83e0e01385213f5c64eecdb0 (patch) | |
tree | e90b5c6b5330f6da9acc7f1530731a70669c3570 | |
parent | e14e413957b0c1e357167f43f129a6ef39ef5051 (diff) |
Add include guards to version headers
-rw-r--r-- | libcrystfel/src/libcrystfel-version.c.in | 2 | ||||
-rw-r--r-- | libcrystfel/src/libcrystfel-version.h | 3 | ||||
-rw-r--r-- | src/version.c.in | 4 | ||||
-rw-r--r-- | src/version.h | 3 |
4 files changed, 12 insertions, 0 deletions
diff --git a/libcrystfel/src/libcrystfel-version.c.in b/libcrystfel/src/libcrystfel-version.c.in index f9dc4238..1cde75f7 100644 --- a/libcrystfel/src/libcrystfel-version.c.in +++ b/libcrystfel/src/libcrystfel-version.c.in @@ -1,3 +1,5 @@ +#define LIBCRYSTFEL_VERSION_H + const char *libcrystfel_version_string() { return "@VCS_TAG@"; diff --git a/libcrystfel/src/libcrystfel-version.h b/libcrystfel/src/libcrystfel-version.h index 7e3ac4f7..837b8299 100644 --- a/libcrystfel/src/libcrystfel-version.h +++ b/libcrystfel/src/libcrystfel-version.h @@ -1,2 +1,5 @@ +#ifndef LIBCRYSTFEL_VERSION_H +#define LIBCRYSTFEL_VERSION_H extern const char *libcrystfel_version_string(void); extern const char *libcrystfel_licence_string(void); +#endif diff --git a/src/version.c.in b/src/version.c.in index bf2fddee..86315801 100644 --- a/src/version.c.in +++ b/src/version.c.in @@ -1,3 +1,7 @@ +/* Prevent subsequent inclusion of version.h + * (e.g. in the case of Meson unity build mode) */ +#define CRYSTFEL_VERSION_H + const char *crystfel_version_string() { return "@VCS_TAG@"; diff --git a/src/version.h b/src/version.h index 0ecac74a..e31c4c17 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,5 @@ +#ifndef CRYSTFEL_VERSION_H +#define CRYSTFEL_VERSION_H extern const char *crystfel_version_string(void); extern const char *crystfel_licence_string(void); +#endif |