print srsLTE version name if no git details are found

This commit is contained in:
Andre Puschmann 2018-07-17 09:43:05 +02:00
parent 10469cd3a0
commit f6f47f0320
1 changed files with 4 additions and 3 deletions

View File

@ -133,15 +133,16 @@ std::string ue_base::get_build_mode()
std::string ue_base::get_build_info()
{
if (std::string(srslte_get_build_info()) == "") {
return std::string(srslte_get_version());
}
return std::string(srslte_get_build_info());
}
std::string ue_base::get_build_string()
{
std::stringstream ss;
if (get_build_mode() != "" && get_build_info() != "") {
ss << "Built in " << get_build_mode() << " mode using " << get_build_info() << "." << std::endl;
}
ss << "Built in " << get_build_mode() << " mode using " << get_build_info() << "." << std::endl;
return ss.str();
}