diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-14 19:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-07-14 19:18:59 (GMT) |
commit | eaad8072eefb9cbb7bf60d9753492e6fb604fd09 (patch) | |
tree | 3c50fd113dcc289e557cdc06062e6db41f8de9f8 /Source/cmLocalGenerator.cxx | |
parent | 2da778664d3e99ada4e67a5a1b9d377f92a9f75f (diff) | |
download | CMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.zip CMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.tar.gz CMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.tar.bz2 |
cmNonempty: Convenience inlines to check for non-empty string
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index e7f2e64..961f349 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1972,7 +1972,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) { @@ -3807,8 +3807,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()) { @@ -3847,8 +3846,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()) { |