From b52285d05693a528a84174c65b6fd4f2f6d243bb Mon Sep 17 00:00:00 2001 From: Philipp Zagar Date: Wed, 28 Feb 2024 12:44:01 -0800 Subject: [PATCH] Fix external parameters --- common/common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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