|
@@ -365,7 +365,7 @@ std::string cmGeneratorTarget::GetExportName() const
|
|
|
{
|
|
|
cmProp exportName = this->GetProperty("EXPORT_NAME");
|
|
|
|
|
|
- if (exportName && !exportName->empty()) {
|
|
|
+ if (cmNonempty(exportName)) {
|
|
|
if (!cmGeneratorExpression::IsValidTargetName(*exportName)) {
|
|
|
std::ostringstream e;
|
|
|
e << "EXPORT_NAME property \"" << *exportName << "\" for \""
|
|
@@ -1193,7 +1193,7 @@ bool cmGeneratorTarget::MaybeHaveInterfaceProperty(
|
|
|
|
|
|
// If this target itself has a non-empty property value, we are done.
|
|
|
cmProp p = this->GetProperty(prop);
|
|
|
- maybeInterfaceProp = p && !p->empty();
|
|
|
+ maybeInterfaceProp = cmNonempty(p);
|
|
|
|
|
|
// Otherwise, recurse to interface dependencies.
|
|
|
if (!maybeInterfaceProp) {
|
|
@@ -1840,12 +1840,12 @@ std::string cmGeneratorTarget::GetCompilePDBName(
|
|
|
std::string configUpper = cmSystemTools::UpperCase(config);
|
|
|
std::string configProp = cmStrCat("COMPILE_PDB_NAME_", configUpper);
|
|
|
cmProp config_name = this->GetProperty(configProp);
|
|
|
- if (config_name && !config_name->empty()) {
|
|
|
+ if (cmNonempty(config_name)) {
|
|
|
return prefix + *config_name + ".pdb";
|
|
|
}
|
|
|
|
|
|
cmProp name = this->GetProperty("COMPILE_PDB_NAME");
|
|
|
- if (name && !name->empty()) {
|
|
|
+ if (cmNonempty(name)) {
|
|
|
return prefix + *name + ".pdb";
|
|
|
}
|
|
|
|
|
@@ -2292,7 +2292,7 @@ std::string cmGeneratorTarget::GetInstallNameDirForInstallTree(
|
|
|
cmProp install_name_dir = this->GetProperty("INSTALL_NAME_DIR");
|
|
|
|
|
|
if (this->CanGenerateInstallNameDir(INSTALL_NAME_FOR_INSTALL)) {
|
|
|
- if (install_name_dir && !install_name_dir->empty()) {
|
|
|
+ if (cmNonempty(install_name_dir)) {
|
|
|
dir = *install_name_dir;
|
|
|
cmGeneratorExpression::ReplaceInstallPrefix(dir, installPrefix);
|
|
|
dir =
|
|
@@ -5839,7 +5839,7 @@ std::string cmGeneratorTarget::GetRuntimeLinkLibrary(
|
|
|
// not it is overridden by a property.
|
|
|
cmProp runtimeLibraryDefault = this->Makefile->GetDef(
|
|
|
cmStrCat("CMAKE_", lang, "_RUNTIME_LIBRARY_DEFAULT"));
|
|
|
- if (!runtimeLibraryDefault || runtimeLibraryDefault->empty()) {
|
|
|
+ if (!cmNonempty(runtimeLibraryDefault)) {
|
|
|
return std::string();
|
|
|
}
|
|
|
cmProp runtimeLibraryValue =
|
|
@@ -6972,7 +6972,7 @@ std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const
|
|
|
bool cmGeneratorTarget::IsDeprecated() const
|
|
|
{
|
|
|
cmProp deprecation = this->GetProperty("DEPRECATION");
|
|
|
- return deprecation && !deprecation->empty();
|
|
|
+ return cmNonempty(deprecation);
|
|
|
}
|
|
|
|
|
|
std::string cmGeneratorTarget::GetDeprecation() const
|
|
@@ -7037,7 +7037,7 @@ bool cmGeneratorTarget::IsCSharpOnly() const
|
|
|
// Consider an explicit linker language property, but *not* the
|
|
|
// computed linker language that may depend on linked targets.
|
|
|
cmProp linkLang = this->GetProperty("LINKER_LANGUAGE");
|
|
|
- if (linkLang && !linkLang->empty()) {
|
|
|
+ if (cmNonempty(linkLang)) {
|
|
|
languages.insert(*linkLang);
|
|
|
}
|
|
|
return languages.size() == 1 && languages.count("CSharp") > 0;
|