summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmCacheManager.cxx5
-rw-r--r--Source/cmComputeLinkInformation.cxx4
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx10
-rw-r--r--Source/cmFindPackageCommand.cxx6
-rw-r--r--Source/cmGeneratorTarget.cxx5
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx6
-rw-r--r--Source/cmGlobalGenerator.cxx16
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx3
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx25
-rw-r--r--Source/cmLocalGenerator.cxx7
-rw-r--r--Source/cmMakefile.cxx6
-rw-r--r--Source/cmMakefileTargetGenerator.cxx3
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx4
-rw-r--r--Source/cmQtAutoGenInitializer.cxx2
-rw-r--r--Source/cmSourceFile.cxx3
-rw-r--r--Source/cmState.cxx3
-rw-r--r--Source/cmStateDirectory.cxx3
-rw-r--r--Source/cmStateSnapshot.cxx2
-rw-r--r--Source/cmStringAlgorithms.h18
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmXCodeScheme.cxx3
-rw-r--r--Source/cmake.cxx8
23 files changed, 60 insertions, 88 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 35bd681c95..95686ead8e 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -578,10 +578,7 @@ cmProp cmCacheManager::CacheEntry::GetProperty(const std::string& prop) const
bool cmCacheManager::CacheEntry::GetPropertyAsBool(
const std::string& prop) const
{
- if (cmProp value = this->GetProperty(prop)) {
- return cmIsOn(*value);
- }
- return false;
+ return cmIsOn(this->GetProperty(prop));
}
void cmCacheManager::CacheEntry::SetProperty(const std::string& prop,
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 5efa3655ac..fbb95e14ed 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -515,7 +515,7 @@ bool cmComputeLinkInformation::Compute()
// Restore the target link type so the correct system runtime
// libraries are found.
cmProp lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC");
- if (lss && cmIsOn(*lss)) {
+ if (cmIsOn(lss)) {
this->SetCurrentLinkType(LinkStatic);
} else {
this->SetCurrentLinkType(this->StartLinkType);
@@ -841,7 +841,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
// Lookup the starting link type from the target (linked statically?).
cmProp lss = this->Target->GetProperty("LINK_SEARCH_START_STATIC");
- this->StartLinkType = (lss && cmIsOn(*lss)) ? LinkStatic : LinkShared;
+ this->StartLinkType = cmIsOn(lss) ? LinkStatic : LinkShared;
this->CurrentLinkType = this->StartLinkType;
}
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 652c0413a4..be22ad41a4 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -236,9 +236,8 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
//
// Also we can disable external (outside the project) files by setting ON
// CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable.
- const bool excludeExternal =
- cmIsOn(it.second[0]->GetMakefile()->GetSafeDefinition(
- "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
+ const bool excludeExternal = it.second[0]->GetMakefile()->IsOn(
+ "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES");
if (!splitted.empty() &&
(!excludeExternal || (relative.find("..") == std::string::npos)) &&
relative.find("CMakeFiles") == std::string::npos) {
@@ -380,9 +379,8 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
cmSystemTools::RelativePath(lg->GetSourceDirectory(), fullPath);
// Do not add this file if it has ".." in relative path and
// if CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable is on.
- const bool excludeExternal =
- cmIsOn(lg->GetMakefile()->GetSafeDefinition(
- "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES"));
+ const bool excludeExternal = lg->GetMakefile()->IsOn(
+ "CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES");
if (excludeExternal &&
(relative.find("..") != std::string::npos)) {
continue;
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 8d5b177f2b..e5fa14edbf 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1166,9 +1166,9 @@ void cmFindPackageCommand::AppendSuccessInformation()
std::string found = cmStrCat(this->Name, "_FOUND");
std::string upperFound = cmSystemTools::UpperCase(found);
- const char* upperResult = this->Makefile->GetDefinition(upperFound);
- const char* result = this->Makefile->GetDefinition(found);
- bool packageFound = ((cmIsOn(result)) || (cmIsOn(upperResult)));
+ bool upperResult = this->Makefile->IsOn(upperFound);
+ bool result = this->Makefile->IsOn(found);
+ bool packageFound = (result || upperResult);
this->AppendToFoundProperty(packageFound);
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 9e6f99544a..46615d308f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -854,9 +854,8 @@ bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang,
std::string const& config) const
{
cmProp feature = this->GetFeature("INTERPROCEDURAL_OPTIMIZATION", config);
- const bool result = feature && cmIsOn(*feature);
- if (!result) {
+ if (!cmIsOn(feature)) {
// 'INTERPROCEDURAL_OPTIMIZATION' is off, no need to check policies
return false;
}
@@ -1001,7 +1000,7 @@ bool cmGeneratorTarget::GetLanguageStandardRequired(
{
cmProp p =
this->GetPropertyWithPairedLanguageSupport(lang, "_STANDARD_REQUIRED");
- return p && cmIsOn(*p);
+ return cmIsOn(p);
}
void cmGeneratorTarget::GetModuleDefinitionSources(
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 358d65a8c4..1589c47eaa 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -550,9 +550,9 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
*/
for (auto& sg : groupFilesList) {
std::ostream* fout;
- bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty(
- "GHS_NO_SOURCE_GROUP_FILE")) ||
- cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"));
+ bool useProjectFile =
+ cmIsOn(this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE")) ||
+ this->Makefile->IsOn("CMAKE_GHS_NO_SOURCE_GROUP_FILE");
if (useProjectFile || sg.empty()) {
fout = &fout_proj;
} else {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index a0cee0e516..49b73a833b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -304,14 +304,10 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const
for (const auto& target : localGen->GetGeneratorTargets()) {
if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY) {
+ target->GetType() == cmStateEnums::TargetType::UTILITY ||
+ cmIsOn(target->GetProperty("ghs_integrity_app"))) {
continue;
}
- if (cmProp p = target->GetProperty("ghs_integrity_app")) {
- if (cmIsOn(*p)) {
- continue;
- }
- }
std::vector<std::string> configs =
target->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
@@ -374,14 +370,10 @@ bool cmGlobalGenerator::CheckTargetsForPchCompilePdb() const
for (const auto& target : generator->GetGeneratorTargets()) {
if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY) {
+ target->GetType() == cmStateEnums::TargetType::UTILITY ||
+ cmIsOn(target->GetProperty("ghs_integrity_app"))) {
continue;
}
- if (cmProp p = target->GetProperty("ghs_integrity_app")) {
- if (cmIsOn(*p)) {
- continue;
- }
- }
std::string const& reuseFrom =
target->GetSafeProperty("PRECOMPILE_HEADERS_REUSE_FROM");
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index d36adfb746..4d52d9662e 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -470,8 +470,7 @@ void cmGlobalGhsMultiGenerator::WriteAllTarget(
if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
continue;
}
- cmProp p = t->GetProperty("EXCLUDE_FROM_ALL");
- if (!(p && cmIsOn(*p))) {
+ if (!cmIsOn(t->GetProperty("EXCLUDE_FROM_ALL"))) {
defaultTargets.push_back(t);
}
}
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 1d3bf2042d..c851eea323 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -694,8 +694,7 @@ std::set<std::string> cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
}
// inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties
for (std::string const& i : configs) {
- cmProp propertyValue = target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i);
- if (!propertyValue || cmIsOff(*propertyValue)) {
+ if (cmIsOff(target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i))) {
activeConfigs.insert(i);
}
}
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index c50a786843..5739feca1f 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -191,21 +191,18 @@ bool requireDeviceLinking(cmGeneratorTarget& target, cmLocalGenerator& lg,
target.GetLinkClosure(config);
if (cm::contains(closure->Languages, "CUDA")) {
- if (cmProp separableCompilation =
- target.GetProperty("CUDA_SEPARABLE_COMPILATION")) {
- if (cmIsOn(*separableCompilation)) {
- bool doDeviceLinking = false;
- switch (target.GetType()) {
- case cmStateEnums::SHARED_LIBRARY:
- case cmStateEnums::MODULE_LIBRARY:
- case cmStateEnums::EXECUTABLE:
- doDeviceLinking = true;
- break;
- default:
- break;
- }
- return doDeviceLinking;
+ if (cmIsOn(target.GetProperty("CUDA_SEPARABLE_COMPILATION"))) {
+ bool doDeviceLinking = false;
+ switch (target.GetType()) {
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::EXECUTABLE:
+ doDeviceLinking = true;
+ break;
+ default:
+ break;
}
+ return doDeviceLinking;
}
cmComputeLinkInformation* pcli = target.GetLinkInformation(config);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e7f2e640ab..59880c2f42 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -130,7 +130,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile)
this->LinkerSysroot = this->Makefile->GetSafeDefinition("CMAKE_SYSROOT");
}
- if (std::string const* appleArchSysroots =
+ if (cmProp appleArchSysroots =
this->Makefile->GetDef("CMAKE_APPLE_ARCH_SYSROOTS")) {
std::string const& appleArchs =
this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES");
@@ -1543,9 +1543,8 @@ void cmLocalGenerator::GetTargetFlags(
frameworkPath, linkPath);
}
- if (cmIsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) {
- std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") +
- linkLanguage + std::string("_FLAGS");
+ if (this->Makefile->IsOn("BUILD_SHARED_LIBS")) {
+ std::string sFlagVar = "CMAKE_SHARED_BUILD_" + linkLanguage + "_FLAGS";
exeFlags += this->Makefile->GetSafeDefinition(sFlagVar);
exeFlags += " ";
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 75c893492c..aca40fabf1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2521,8 +2521,7 @@ void cmMakefile::ExpandVariablesCMP0019()
bool cmMakefile::IsOn(const std::string& name) const
{
- const char* value = this->GetDefinition(name);
- return cmIsOn(value);
+ return cmIsOn(this->GetDef(name));
}
bool cmMakefile::IsSet(const std::string& name) const
@@ -4116,8 +4115,7 @@ cmProp cmMakefile::GetProperty(const std::string& prop, bool chain) const
bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
{
- cmProp p = this->GetProperty(prop);
- return p && cmIsOn(*p);
+ return cmIsOn(this->GetProperty(prop));
}
std::vector<std::string> cmMakefile::GetPropertyKeys() const
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6887569f5f..9f4c18d25c 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -197,8 +197,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
}
// add custom commands to the clean rules?
- cmProp clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
- bool clean = clean_no_custom ? cmIsOff(*clean_no_custom) : true;
+ bool clean = cmIsOff(this->Makefile->GetProperty("CLEAN_NO_CUSTOM"));
// First generate the object rule files. Save a list of all object
// files for this target.
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index 3d4f5d7227..fac2bbf2dc 100644
--- a/Source/cmQtAutoGenGlobalInitializer.cxx
+++ b/Source/cmQtAutoGenGlobalInitializer.cxx
@@ -50,7 +50,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
{
cmMakefile* makefile = localGen->GetMakefile();
// Detect global autogen target name
- if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET"))) {
+ if (makefile->IsOn("CMAKE_GLOBAL_AUTOGEN_TARGET")) {
std::string targetName =
makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTOGEN_TARGET_NAME");
if (targetName.empty()) {
@@ -61,7 +61,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
}
// Detect global autorcc target name
- if (cmIsOn(makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET"))) {
+ if (makefile->IsOn("CMAKE_GLOBAL_AUTORCC_TARGET")) {
std::string targetName =
makefile->GetSafeDefinition("CMAKE_GLOBAL_AUTORCC_TARGET_NAME");
if (targetName.empty()) {
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 7e0bf96143..d80092abdc 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -489,7 +489,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
if (this->Moc.Enabled) {
// Path prefix
- if (cmIsOn(this->GenTarget->GetSafeProperty("AUTOMOC_PATH_PREFIX"))) {
+ if (cmIsOn(this->GenTarget->GetProperty("AUTOMOC_PATH_PREFIX"))) {
this->Moc.PathPrefix = true;
}
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 781ddbc36a..ef44a578db 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -380,8 +380,7 @@ const char* cmSourceFile::GetSafeProperty(const std::string& prop) const
bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const
{
- cmProp p = this->GetProperty(prop);
- return p && cmIsOn(*p);
+ return cmIsOn(this->GetProperty(prop));
}
void cmSourceFile::SetProperties(cmPropertyMap properties)
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 0b6b40f4d5..73f166c58b 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -623,8 +623,7 @@ cmProp cmState::GetGlobalProperty(const std::string& prop)
bool cmState::GetGlobalPropertyAsBool(const std::string& prop)
{
- cmProp p = this->GetGlobalProperty(prop);
- return p && cmIsOn(*p);
+ return cmIsOn(this->GetGlobalProperty(prop));
}
void cmState::SetSourceDirectory(std::string const& sourceDirectory)
diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx
index a4fe663044..796bb1f754 100644
--- a/Source/cmStateDirectory.cxx
+++ b/Source/cmStateDirectory.cxx
@@ -648,8 +648,7 @@ cmProp cmStateDirectory::GetProperty(const std::string& prop, bool chain) const
bool cmStateDirectory::GetPropertyAsBool(const std::string& prop) const
{
- cmProp p = this->GetProperty(prop);
- return p && cmIsOn(*p);
+ return cmIsOn(this->GetProperty(prop));
}
std::vector<std::string> cmStateDirectory::GetPropertyKeys() const
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index cfabc3fd9f..bf8e331b7c 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -323,7 +323,7 @@ void cmStateSnapshot::SetDefaultDefinitions()
#if defined(__CYGWIN__)
std::string legacy;
if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
- cmIsOn(legacy.c_str())) {
+ cmIsOn(legacy)) {
this->SetDefinition("WIN32", "1");
this->SetDefinition("CMAKE_HOST_WIN32", "1");
}
diff --git a/Source/cmStringAlgorithms.h b/Source/cmStringAlgorithms.h
index a5ecca758d..3d5bf7e795 100644
--- a/Source/cmStringAlgorithms.h
+++ b/Source/cmStringAlgorithms.h
@@ -205,10 +205,11 @@ bool cmIsNOTFOUND(cm::string_view val);
bool cmIsOn(cm::string_view val);
inline bool cmIsOn(const char* val)
{
- if (!val) {
- return false;
- }
- return cmIsOn(cm::string_view(val));
+ return val && cmIsOn(cm::string_view(val));
+}
+inline bool cmIsOn(std::string const* val)
+{
+ return val && cmIsOn(*val);
}
/**
@@ -221,10 +222,11 @@ inline bool cmIsOn(const char* val)
bool cmIsOff(cm::string_view val);
inline bool cmIsOff(const char* val)
{
- if (!val) {
- return true;
- }
- return cmIsOff(cm::string_view(val));
+ return !val || cmIsOff(cm::string_view(val));
+}
+inline bool cmIsOff(std::string const* val)
+{
+ return !val || cmIsOff(*val);
}
/** Returns true if string @a str starts with the character @a prefix. */
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a4f9083cf3..aec9afac35 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1884,8 +1884,7 @@ std::string const& cmTarget::GetSafeProperty(std::string const& prop) const
bool cmTarget::GetPropertyAsBool(const std::string& prop) const
{
- cmProp p = this->GetProperty(prop);
- return p && cmIsOn(*p);
+ return cmIsOn(this->GetProperty(prop));
}
cmPropertyMap const& cmTarget::GetProperties() const
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index 0e3cf08d9a..55e941d947 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -324,8 +324,7 @@ bool cmXCodeScheme::WriteLaunchActionBooleanAttribute(
bool defaultValue)
{
cmProp property = Target->GetTarget()->GetProperty(varName);
- bool isOn =
- (property == nullptr && defaultValue) || (property && cmIsOn(*property));
+ bool isOn = (property == nullptr && defaultValue) || cmIsOn(property);
if (isOn) {
xout.Attribute(attrName.c_str(), "YES");
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 265684915c..45fa44b895 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1487,10 +1487,10 @@ int cmake::Configure()
this->Messenger->SetSuppressDeprecatedWarnings(value && cmIsOff(*value));
value = this->State->GetCacheEntryValue("CMAKE_ERROR_DEPRECATED");
- this->Messenger->SetDeprecatedWarningsAsErrors(value && cmIsOn(*value));
+ this->Messenger->SetDeprecatedWarningsAsErrors(cmIsOn(value));
value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_WARNINGS");
- this->Messenger->SetSuppressDevWarnings(value && cmIsOn(*value));
+ this->Messenger->SetSuppressDevWarnings(cmIsOn(value));
value = this->State->GetCacheEntryValue("CMAKE_SUPPRESS_DEVELOPER_ERRORS");
this->Messenger->SetDevWarningsAsErrors(value && cmIsOff(*value));
@@ -2742,9 +2742,7 @@ int cmake::Build(int jobs, const std::string& dir,
}
projName = *cachedProjectName;
- cmProp cachedVerbose =
- this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE");
- if (cachedVerbose && cmIsOn(*cachedVerbose)) {
+ if (cmIsOn(this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE"))) {
verbose = true;
}