summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@users.noreply.gitlab.com>2024-03-17 23:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@users.noreply.gitlab.com>2024-03-17 23:05:37 (GMT)
commit1a49b439a548a5ccc573e85c86ef42ece1d267ae (patch)
tree5cb159207f37bb6665f8f089330bbb868c11adf4 /Source/cmMakefile.cxx
parentf440439dee558273a32e4efa39e10a9ff6b479d5 (diff)
downloadCMake-1a49b439a548a5ccc573e85c86ef42ece1d267ae.zip
CMake-1a49b439a548a5ccc573e85c86ef42ece1d267ae.tar.gz
CMake-1a49b439a548a5ccc573e85c86ef42ece1d267ae.tar.bz2
Source: Use cmValue::IsOn and IsOff
Speed up a bit by calling members directly.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index cfaac11..bd24f83 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2522,7 +2522,7 @@ void cmMakefile::ExpandVariablesCMP0019()
bool cmMakefile::IsOn(const std::string& name) const
{
- return cmIsOn(this->GetDefinition(name));
+ return this->GetDefinition(name).IsOn();
}
bool cmMakefile::IsSet(const std::string& name) const
@@ -4025,7 +4025,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
// Replace #cmakedefine instances.
if (this->cmDefineRegex.find(line)) {
cmValue def = this->GetDefinition(this->cmDefineRegex.match(2));
- if (!cmIsOff(def)) {
+ if (!def.IsOff()) {
const std::string indentation = this->cmDefineRegex.match(1);
cmSystemTools::ReplaceString(line,
cmStrCat("#", indentation, "cmakedefine"),
@@ -4043,7 +4043,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
cmStrCat("#", indentation, "cmakedefine01"),
cmStrCat("#", indentation, "define"));
output += line;
- if (!cmIsOff(def)) {
+ if (!def.IsOff()) {
output += " 1";
} else {
output += " 0";
@@ -4218,7 +4218,7 @@ cmValue cmMakefile::GetProperty(const std::string& prop, bool chain) const
bool cmMakefile::GetPropertyAsBool(const std::string& prop) const
{
- return cmIsOn(this->GetProperty(prop));
+ return this->GetProperty(prop).IsOn();
}
std::vector<std::string> cmMakefile::GetPropertyKeys() const
@@ -4625,7 +4625,7 @@ bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var) const
{
// Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
if (cmValue val = this->GetDefinition(var)) {
- return cmIsOn(val);
+ return val.IsOn();
}
// Enable optional policy warnings with --debug-output, --trace,
// or --trace-expand.