diff --git a/common/common.h b/common/common.h index 25003df26..2a3597fcc 100644 --- a/common/common.h +++ b/common/common.h @@ -32,10 +32,22 @@ } while(0) // build info +// If macro is not defined (passed via Xcode), set the corresponding variable as defined via external variable. +#ifndef LLAMA_BUILD_NUMBER extern int LLAMA_BUILD_NUMBER; +#endif + +#ifndef LLAMA_COMMIT extern char const *LLAMA_COMMIT; +#endif + +#ifndef LLAMA_COMPILER extern char const *LLAMA_COMPILER; +#endif + +#ifndef LLAMA_BUILD_TARGET extern char const *LLAMA_BUILD_TARGET; +#endif // // CLI argument parsing