summaryrefslogtreecommitdiff
path: root/Source/cmCMakePolicyCommand.cxx
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-12-14 04:46:38 +0100
committerAsit Dhal <dhal.asitk@gmail.com>2020-12-14 04:55:55 +0100
commit99a98eefac1aa9f4a3c6b0f3fd614182ec851571 (patch)
tree2eebaa8bc1048ec7a02862ba23bef92bcc8511ce /Source/cmCMakePolicyCommand.cxx
parent4621ffb0285b32898fa7b8ddd8380d39c597642c (diff)
downloadcmake-99a98eefac1aa9f4a3c6b0f3fd614182ec851571.tar.gz
cmake_policy: Add check for return value of SetPolicyVersion
Fixes: #21557
Diffstat (limited to 'Source/cmCMakePolicyCommand.cxx')
-rw-r--r--Source/cmCMakePolicyCommand.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx
index b7f08d2dd0..1f99043647 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -191,8 +191,7 @@ bool HandleVersionMode(std::vector<std::string> const& args,
return false;
}
- status.GetMakefile().SetPolicyVersion(version_min, version_max);
- return true;
+ return status.GetMakefile().SetPolicyVersion(version_min, version_max);
}
bool HandleGetWarningMode(std::vector<std::string> const& args,