-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: additions to nxrunner for detailed version information.
Signed-off-by: Michael Jackson <[email protected]>
- Loading branch information
1 parent
867a59f
commit d9db897
Showing
6 changed files
with
442 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
/*-------------------------------------------------------------------------- | ||
* This file is autogenerated from: | ||
* @CMAKE_CURRENT_LIST_DIR@/DREAM3DVersion.cpp.in | ||
* during the cmake configuration of your project. If you need to make changes, | ||
* edit the original file NOT THIS FILE. | ||
* --------------------------------------------------------------------------*/ | ||
|
||
#include "ComplexVersion.hpp" | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::ApplicationName() | ||
{ | ||
return {"@PROJECT_PREFIX@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Complete() | ||
{ | ||
return {"@VERSION_GEN_VER_MAJOR@.@VERSION_GEN_VER_MINOR@.@VERSION_GEN_VER_PATCH@@VERSION_GEN_VER_SUFFIX@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Major() | ||
{ | ||
return {"@VERSION_GEN_VER_MAJOR@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Minor() | ||
{ | ||
return {"@VERSION_GEN_VER_MINOR@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Patch() | ||
{ | ||
return {"@VERSION_GEN_VER_PATCH@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Suffix() | ||
{ | ||
return {"@VERSION_GEN_VER_SUFFIX@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::Package() | ||
{ | ||
return {"@VERSION_GEN_VER_MAJOR@.@VERSION_GEN_VER_MINOR@.@VERSION_GEN_VER_PATCH@@VERSION_GEN_VER_SUFFIX@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::PackageComplete() | ||
{ | ||
return {"@PROJECT_PREFIX@ Version @VERSION_GEN_VER_MAJOR@.@VERSION_GEN_VER_MINOR@.@VERSION_GEN_VER_PATCH@@VERSION_GEN_VER_SUFFIX@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::BuildDate() | ||
{ | ||
return {"@VERSION_BUILD_DATE@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::GitHashShort() | ||
{ | ||
return {"@VERSION_GEN_GIT_HASH_SHORT@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@GVS_STRING_CLASS@ @VERSION_GEN_NAMESPACE@::Version::GitHash() | ||
{ | ||
return {"@GVS_GIT_HASH@"}; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@VERSION_GEN_NAMESPACE@::Version::AppVersion::AppVersion() = default; | ||
|
||
// ----------------------------------------------------------------------------- | ||
@VERSION_GEN_NAMESPACE@::Version::AppVersion::AppVersion(int majorNum, int minorNum, int patchNum) | ||
{ | ||
m_MajorNum = majorNum; | ||
m_MinorNum = minorNum; | ||
m_PatchNum = patchNum; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@VERSION_GEN_NAMESPACE@::Version::AppVersion::~AppVersion() = default; | ||
|
||
// ----------------------------------------------------------------------------- | ||
@VERSION_GEN_NAMESPACE@::Version::AppVersion::AppVersion(const @VERSION_GEN_NAMESPACE@::Version::AppVersion& rhs) | ||
{ | ||
m_MajorNum = rhs.m_MajorNum; | ||
m_MinorNum = rhs.m_MinorNum; | ||
m_PatchNum = rhs.m_PatchNum; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
@VERSION_GEN_NAMESPACE@::Version::AppVersion& @VERSION_GEN_NAMESPACE@::Version::AppVersion::operator=(const AppVersion& rhs) = default; | ||
|
||
// ----------------------------------------------------------------------------- | ||
bool @VERSION_GEN_NAMESPACE@::Version::AppVersion::operator==(const @VERSION_GEN_NAMESPACE@::Version::AppVersion& rhs) | ||
{ | ||
return (m_MajorNum == rhs.m_MajorNum && m_MinorNum == rhs.m_MinorNum && m_PatchNum == rhs.m_PatchNum); | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
bool @VERSION_GEN_NAMESPACE@::Version::AppVersion::operator>(const @VERSION_GEN_NAMESPACE@::Version::AppVersion& rhs) | ||
{ | ||
if(m_MajorNum > rhs.m_MajorNum) | ||
{ | ||
return true; | ||
} | ||
|
||
if(m_MajorNum == rhs.m_MajorNum) | ||
{ | ||
if(m_MinorNum > rhs.m_MinorNum) | ||
{ | ||
return true; | ||
} | ||
|
||
if(m_MinorNum == rhs.m_MinorNum) | ||
{ | ||
return m_PatchNum > rhs.m_PatchNum; | ||
} | ||
return false; | ||
} | ||
return false; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
bool @VERSION_GEN_NAMESPACE@::Version::AppVersion::operator<(const @VERSION_GEN_NAMESPACE@::Version::AppVersion& rhs) | ||
{ | ||
if(m_MajorNum < rhs.m_MajorNum) | ||
{ | ||
return true; | ||
} | ||
|
||
if(m_MajorNum == rhs.m_MajorNum) | ||
{ | ||
if(m_MinorNum < rhs.m_MinorNum) | ||
{ | ||
return true; | ||
} | ||
|
||
if(m_MinorNum == rhs.m_MinorNum) | ||
{ | ||
return m_PatchNum < rhs.m_PatchNum; | ||
} | ||
return false; | ||
} | ||
return false; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
int @VERSION_GEN_NAMESPACE@::Version::AppVersion::getMajorNum() | ||
{ | ||
return m_MajorNum; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
int @VERSION_GEN_NAMESPACE@::Version::AppVersion::getMinorNum() | ||
{ | ||
return m_MinorNum; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
int @VERSION_GEN_NAMESPACE@::Version::AppVersion::getPatchNum() | ||
{ | ||
return m_PatchNum; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
void @VERSION_GEN_NAMESPACE@::Version::AppVersion::setMajorNum(int major) | ||
{ | ||
m_MajorNum = major; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
void @VERSION_GEN_NAMESPACE@::Version::AppVersion::setMinorNum(int minor) | ||
{ | ||
m_MinorNum = minor; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
void @VERSION_GEN_NAMESPACE@::Version::AppVersion::setPatchNum(int patch) | ||
{ | ||
m_PatchNum = patch; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace complex::Version | ||
{ | ||
|
||
std::string ApplicationName(); | ||
std::string Complete(); | ||
std::string Major(); | ||
std::string Minor(); | ||
std::string Patch(); | ||
std::string Suffix(); | ||
std::string Package(); | ||
std::string PackageComplete(); | ||
std::string BuildDate(); | ||
std::string GitHashShort(); | ||
std::string GitHash(); | ||
|
||
class AppVersion | ||
{ | ||
public: | ||
AppVersion(); | ||
AppVersion(int majorNum, int minorNum, int patchNum); | ||
|
||
AppVersion(const AppVersion&); | ||
AppVersion(const AppVersion&&) = delete; | ||
AppVersion& operator=(const AppVersion&); | ||
AppVersion& operator=(AppVersion&&) = delete; | ||
|
||
bool operator==(const AppVersion&); | ||
bool operator>(const AppVersion&); | ||
bool operator<(const AppVersion&); | ||
|
||
virtual ~AppVersion(); | ||
|
||
int getMajorNum(); | ||
int getMinorNum(); | ||
int getPatchNum(); | ||
|
||
void setMajorNum(int major); | ||
void setMinorNum(int minor); | ||
void setPatchNum(int patch); | ||
|
||
private: | ||
int m_MajorNum = -1; | ||
int m_MinorNum = -1; | ||
int m_PatchNum = -1; | ||
}; | ||
} // namespace DREAM3DNX::Version |
Oops, something went wrong.