From 222919be87386af66bba836fbb9495b64b4007f4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 30 Nov 2016 20:10:28 -0500 Subject: DRTVWR-418: Adjust for LL_VIEWER_CHANNEL coming in unquoted. Evidently the LL_VIEWER_CHANNEL macro (defined on the compiler command line) used to contain enclosing double quotes. Something changed (newer CMake version?) so that the macro now expands as Second Life Release rather than as "Second Life Release". That leads to syntax errors when it's used. Add C++ preprocessor trickery to stringize the value of the macro. --- indra/newview/llversioninfo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llversioninfo.cpp') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index a0ca91672a..375dce485d 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -99,10 +99,16 @@ const std::string &LLVersionInfo::getShortVersion() namespace { + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The + // macro expands to the string name of the channel, but without quotes. We + // need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) + /// Storage of the channel name the viewer is using. // The channel name is set by hardcoded constant, // or by calling LLVersionInfo::resetChannel() - std::string sWorkingChannelName(LL_VIEWER_CHANNEL); + std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL)); // Storage for the "version and channel" string. // This will get reset too. -- cgit v1.2.3 From 9c5332b301c0e17cd0133944670f79fd485cf7fe Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 6 Mar 2017 14:43:57 -0800 Subject: SL-321: reintegration of autobuild as package, build changes for mac integration --- indra/newview/llversioninfo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llversioninfo.cpp') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 375dce485d..bf9d98ee91 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -64,6 +64,7 @@ S32 LLVersionInfo::getPatch() //static S32 LLVersionInfo::getBuild() { + std::cout << "What we have IN llversioninfo: " << LL_VIEWER_VERSION_BUILD << std::endl; return LL_VIEWER_VERSION_BUILD; } -- cgit v1.2.3 From 7107eb8db4f703fa64a2a01392ba8ca843d9be95 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 22 Mar 2017 14:52:30 -0700 Subject: remove stray debug message --- indra/newview/llversioninfo.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llversioninfo.cpp') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index bf9d98ee91..375dce485d 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -64,7 +64,6 @@ S32 LLVersionInfo::getPatch() //static S32 LLVersionInfo::getBuild() { - std::cout << "What we have IN llversioninfo: " << LL_VIEWER_VERSION_BUILD << std::endl; return LL_VIEWER_VERSION_BUILD; } -- cgit v1.2.3