cmNonempty: Convenience inlines to check for non-empty string

This commit is contained in:
Vitaly Stakhovsky
2020-07-14 15:00:00 -04:00
parent 2da778664d
commit eaad8072ee
19 changed files with 69 additions and 58 deletions

View File

@@ -239,7 +239,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(
std::string launcher;
const char* val = this->GetLocalGenerator()->GetRuleLauncher(
this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
if (val && *val) {
if (cmNonempty(val)) {
launcher = cmStrCat(val, ' ');
}
@@ -376,7 +376,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile,
std::string launcher;
const char* val = this->GetLocalGenerator()->GetRuleLauncher(
this->GetGeneratorTarget(), "RULE_LAUNCH_LINK");
if (val && *val) {
if (cmNonempty(val)) {
launcher = cmStrCat(val, ' ');
}