1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 03:48:02 +08:00

GetSafeProperty: return std::string const&

This commit is contained in:
Vitaly Stakhovsky
2020-04-30 10:00:00 -04:00
committed by Brad King
parent c09efe074d
commit 53675adbcf
12 changed files with 36 additions and 28 deletions

View File

@@ -440,7 +440,8 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
// Autogen target parallel processing
{
std::string prop = this->GenTarget->GetSafeProperty("AUTOGEN_PARALLEL");
std::string const& prop =
this->GenTarget->GetSafeProperty("AUTOGEN_PARALLEL");
if (prop.empty() || (prop == "AUTO")) {
// Autodetect number of CPUs
this->AutogenTarget.Parallel = GetParallelCPUCount();
@@ -471,7 +472,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
this->AutogenTarget.DependOrigin =
this->GenTarget->GetPropertyAsBool("AUTOGEN_ORIGIN_DEPENDS");
std::string const deps =
std::string const& deps =
this->GenTarget->GetSafeProperty("AUTOGEN_TARGET_DEPENDS");
if (!deps.empty()) {
for (std::string const& depName : cmExpandedList(deps)) {
@@ -654,7 +655,7 @@ bool cmQtAutoGenInitializer::InitUic()
{
// Uic search paths
{
std::string const usp =
std::string const& usp =
this->GenTarget->GetSafeProperty("AUTOUIC_SEARCH_PATHS");
if (!usp.empty()) {
this->Uic.SearchPaths =
@@ -1794,7 +1795,7 @@ bool cmQtAutoGenInitializer::GetQtExecutable(GenVarsT& genVars,
// Custom executable
{
std::string const prop = cmStrCat(genVars.GenNameUpper, "_EXECUTABLE");
std::string const val = this->GenTarget->Target->GetSafeProperty(prop);
std::string const& val = this->GenTarget->Target->GetSafeProperty(prop);
if (!val.empty()) {
// Evaluate generator expression
{