summaryrefslogtreecommitdiffstats
path: root/Source/cmFileSet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileSet.cxx')
-rw-r--r--Source/cmFileSet.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmFileSet.cxx b/Source/cmFileSet.cxx
index 1d1d29e..d6665a2 100644
--- a/Source/cmFileSet.cxx
+++ b/Source/cmFileSet.cxx
@@ -45,9 +45,12 @@ cmFileSetVisibility cmFileSetVisibilityFromName(cm::string_view name,
if (name == "PRIVATE"_s) {
return cmFileSetVisibility::Private;
}
- mf->IssueMessage(
- MessageType::FATAL_ERROR,
- cmStrCat("File set visibility \"", name, "\" is not valid."));
+ auto msg = cmStrCat("File set visibility \"", name, "\" is not valid.");
+ if (mf) {
+ mf->IssueMessage(MessageType::FATAL_ERROR, msg);
+ } else {
+ cmSystemTools::Error(msg);
+ }
return cmFileSetVisibility::Private;
}