U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » build_info.h now contains svn revision/url info (if available)
build_info.h now contains svn revision/url info (if available) [message #44959] Fri, 31 July 2015 13:49 Go to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
As demonstrated by new reference example:

#include <Core/Core.h>
#include <build_info.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	StdLogSetup(LOG_COUT|LOG_FILE);

#ifdef bmTIME
	LOG("Compiled " << bmTIME << ", " << (GetSysDate() - (Date)bmTIME) << " day(s) ago");
#endif
#ifdef bmUSER
	LOG("Compiled by user " << bmUSER);
#endif
#ifdef bmMACHINE
	LOG("Compiled on machine " << bmMACHINE);
#endif
#ifdef bmSVN_REVISION
	LOG("Svn revision " << bmSVN_REVISION);
#endif
#ifdef bmSVN_REVISION
	LOG("Svn url " << bmSVN_URL);
#endif
}
Re: build_info.h now contains svn revision/url info (if available) [message #44979 is a reply to message #44959] Thu, 06 August 2015 05:30 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Is it possible to add an UPP_SVN_VERSION (version of UPP that was used to build a package) to a list of defines?

TIA


Regards,
Novo
Re: build_info.h now contains svn revision/url info (if available) [message #44980 is a reply to message #44979] Thu, 06 August 2015 08:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Novo wrote on Thu, 06 August 2015 05:30
Is it possible to add an UPP_SVN_VERSION (version of UPP that was used to build a package) to a list of defines?

TIA


Maybe. Not well defined though...

One possible algorithm is to scan through nests for one ending with 'uppsrc' and get svn version of that. Disadvantage there is that it would work only if uppsrc is svn checkout...
Re: build_info.h now contains svn revision/url info (if available) [message #44984 is a reply to message #44980] Fri, 07 August 2015 03:19 Go to previous message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
mirek wrote on Thu, 06 August 2015 02:22
Disadvantage there is that it would work only if uppsrc is svn checkout...


Even this is much better than nothing. IMHO, everybody who is using UPP is using an SVN version of UPP.

Thanks.


Regards,
Novo
Previous Topic: theide now displays misplaced spaces and tabs
Next Topic: VS2015 and C++ 11
Goto Forum:
  


Current Time: Tue Apr 28 09:25:17 GMT+2 2026

Total time taken to generate the page: 0.00605 seconds