summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-27 23:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-28 12:31:31 (GMT)
commitf37c14e93036fe01fca3539f539ff8821494e9d1 (patch)
treefc08ddab0c3e9b47f00cff9a287cc89a2afa13ca /Source/cmGlobalGhsMultiGenerator.cxx
parent261a2585d9df7113a5ba7c9beacb641754444523 (diff)
downloadCMake-f37c14e93036fe01fca3539f539ff8821494e9d1.zip
CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.gz
CMake-f37c14e93036fe01fca3539f539ff8821494e9d1.tar.bz2
Source: use cmNonempty()
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 9969465..7c87131 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -218,10 +218,11 @@ void cmGlobalGhsMultiGenerator::GetToolset(cmMakefile* mf, std::string& tsd,
{
const char* ghsRoot = mf->GetDefinition("GHS_TOOLSET_ROOT");
- if (!ghsRoot || ghsRoot[0] == '\0') {
- ghsRoot = DEFAULT_TOOLSET_ROOT;
+ if (cmNonempty(ghsRoot)) {
+ tsd = ghsRoot;
+ } else {
+ tsd = DEFAULT_TOOLSET_ROOT;
}
- tsd = ghsRoot;
if (ts.empty()) {
std::vector<std::string> output;