diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-07-15 14:53:35 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-15 14:53:43 (GMT) |
commit | 63ecf481da4d88196410ca67ebd0c9aa69f2e036 (patch) | |
tree | 67d0887bbd39819d995280b3e8ff575066bc4929 /Source/cmLocalGenerator.cxx | |
parent | 36e00f9c843d2e03661119182fd98f0668320e09 (diff) | |
parent | eaad8072eefb9cbb7bf60d9753492e6fb604fd09 (diff) | |
download | CMake-63ecf481da4d88196410ca67ebd0c9aa69f2e036.zip CMake-63ecf481da4d88196410ca67ebd0c9aa69f2e036.tar.gz CMake-63ecf481da4d88196410ca67ebd0c9aa69f2e036.tar.bz2 |
Merge topic 'cmnonempty'
eaad8072ee cmNonempty: Convenience inlines to check for non-empty string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
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 59880c2..af9c1b4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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()) { |