Build-time project name/version id for non-autoconf builds
----------------------------------------------------------
Key: QPID-1309
URL: https://issues.apache.org/jira/browse/QPID-1309
Project: Qpid
Issue Type: Improvement
Components: C++ Broker
Affects Versions: M4
Environment: Windows w/ Visual Studio
Reporter: Steve Huston
Priority: Minor
The qpid product name and version number are currently picked up from
PACKAGE_NAME, PACKAGE_VERSION via configure.ac. This mechanism doesn't exist in
Windows Visual Studio. The alternative I'm proposing is to create a new file
qpid/cpp/src/qpid/Version.h with:
#include <string>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
namespace qpid {
#ifdef HAVE_CONFIG_H
const std::string product = PACKAGE_NAME;
const std::string version = PACKAGE_VERSION;
const std::string saslName = SASL_BROKER_NAME;
#else
const std::string product = "qpidc";
const std::string version = "0.3";
const std::string saslName = "qpid-broker";
#endif
}
Applicable code changes are to refer to qpid::product, etc. rather than
PACKAGE_NAME, etc. This requires a comment in configure.ac noting that if the
name/version changes, also change it in Version.h
Is this ok, or is there some more direct way to manage this?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.