Merge topic 'cmnonempty'

eaad8072ee cmNonempty: Convenience inlines to check for non-empty string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
This commit is contained in:
Kyle Edwards
2020-07-15 14:53:35 +00:00
committed by Kitware Robot
19 changed files with 69 additions and 58 deletions
+3 -5
View File
@@ -1971,7 +1971,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
// of a default selection whether or not it is overridden by a property.
cmProp msvcRuntimeLibraryDefault =
this->Makefile->GetDef("CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT");
if (msvcRuntimeLibraryDefault && !msvcRuntimeLibraryDefault->empty()) {
if (cmNonempty(msvcRuntimeLibraryDefault)) {
cmProp msvcRuntimeLibraryValue =
target->GetProperty("MSVC_RUNTIME_LIBRARY");
if (!msvcRuntimeLibraryValue) {
@@ -3806,8 +3806,7 @@ void cmLocalGenerator::GenerateAppleInfoPList(cmGeneratorTarget* target,
{
// Find the Info.plist template.
cmProp in = target->GetProperty("MACOSX_BUNDLE_INFO_PLIST");
std::string inFile =
(in && !in->empty()) ? *in : "MacOSXBundleInfo.plist.in";
std::string inFile = cmNonempty(in) ? *in : "MacOSXBundleInfo.plist.in";
if (!cmSystemTools::FileIsFullPath(inFile)) {
std::string inMod = this->Makefile->GetModulesFile(inFile);
if (!inMod.empty()) {
@@ -3846,8 +3845,7 @@ void cmLocalGenerator::GenerateFrameworkInfoPList(
{
// Find the Info.plist template.
cmProp in = target->GetProperty("MACOSX_FRAMEWORK_INFO_PLIST");
std::string inFile =
(in && !in->empty()) ? *in : "MacOSXFrameworkInfo.plist.in";
std::string inFile = cmNonempty(in) ? *in : "MacOSXFrameworkInfo.plist.in";
if (!cmSystemTools::FileIsFullPath(inFile)) {
std::string inMod = this->Makefile->GetModulesFile(inFile);
if (!inMod.empty()) {