summaryrefslogtreecommitdiffstats
path: root/Source/cmGetFilenameComponentCommand.cxx
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-06-18 06:26:32 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-18 14:01:45 (GMT)
commit470b3a76b363951c343d5523bb9de77c9ba4bf16 (patch)
tree8d08c9ef8389e92506b1312074469b2d0396aa77 /Source/cmGetFilenameComponentCommand.cxx
parent0a7a4665beaa5a8af42995410e590bc0731d6748 (diff)
downloadCMake-470b3a76b363951c343d5523bb9de77c9ba4bf16.zip
CMake-470b3a76b363951c343d5523bb9de77c9ba4bf16.tar.gz
CMake-470b3a76b363951c343d5523bb9de77c9ba4bf16.tar.bz2
get_filename_component: make errors fatal
Make all errors in `get_filename_component` fatal. Fixes: #20015
Diffstat (limited to 'Source/cmGetFilenameComponentCommand.cxx')
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 811421a..38bffbf 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -14,6 +14,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args,
{
if (args.size() < 3) {
status.SetError("called with incorrect number of arguments");
+ cmSystemTools::SetFatalErrorOccured();
return false;
}
@@ -114,6 +115,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args,
} else {
std::string err = "unknown component " + args[2];
status.SetError(err);
+ cmSystemTools::SetFatalErrorOccured();
return false;
}