mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 18:38:00 +02:00
dev: automatic version.h generation
also added compiler information as a feature
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
#define UNULLABLE
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define COMPILER_VERSION __VERSION__
|
||||
#elif defined(__GNUC__)
|
||||
#define xstr(s) str(s)
|
||||
#define str(s) #s
|
||||
|
||||
#define COMPILER_VERSION \
|
||||
"GCC " xstr(__GNUC__) "." xstr(__GNUC_MINOR__) "." xstr(__GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#define LEN(X) (sizeof(X) / sizeof((X)[0]))
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user