summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-29 12:06:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-29 12:07:04 (GMT)
commitf04c68fab3479e65f00a7ddbacddda326fb1658e (patch)
tree32b5b49a57cf0cc9a318833d027c2b3c39d48fe8
parentef8e8fdf09143904dfa7e26a78b6b7a0e187e419 (diff)
parent78357e98a4c306847ddc30d9d6db361b66baf31b (diff)
downloadCMake-f04c68fab3479e65f00a7ddbacddda326fb1658e.zip
CMake-f04c68fab3479e65f00a7ddbacddda326fb1658e.tar.gz
CMake-f04c68fab3479e65f00a7ddbacddda326fb1658e.tar.bz2
Merge topic 'noduplicates'
78357e98a4 Avoid duplicate calls to GetDefinition Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5073
-rw-r--r--Source/cmGlobalGenerator.cxx6
-rw-r--r--Source/cmGraphVizWriter.cxx2
2 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index eff6665..ac7c236 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -401,15 +401,13 @@ bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
"all generators must specify this->FindMakeProgramFile");
return false;
}
- if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
- cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+ if (cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
std::string setMakeProgram = mf->GetModulesFile(this->FindMakeProgramFile);
if (!setMakeProgram.empty()) {
mf->ReadListFile(setMakeProgram);
}
}
- if (!mf->GetDefinition("CMAKE_MAKE_PROGRAM") ||
- cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
+ if (cmIsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) {
std::ostringstream err;
err << "CMake was unable to find a build program corresponding to \""
<< this->GetName() << "\". CMAKE_MAKE_PROGRAM is not set. You "
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index c23156d..8e9abf8 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -260,7 +260,7 @@ void cmGraphVizWriter::ReadSettings(
do { \
const char* value = mf.GetDefinition(cmakeDefinition); \
if (value) { \
- (var) = mf.IsOn(cmakeDefinition); \
+ (var) = cmIsOn(value); \
} \
} while (false)