summaryrefslogtreecommitdiffstats
path: root/Source/cmFileSet.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-04-22 22:02:46 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-04-27 12:56:46 (GMT)
commit5f93cf4afea05ffaf7b688bbc4080a3410a20bc3 (patch)
tree0aba5ffe360397fbbe8cd1b01c4b0e5ff4f1a4cc /Source/cmFileSet.cxx
parent4b63f2ca4aeda1206012942378463ec2894991c2 (diff)
downloadCMake-5f93cf4afea05ffaf7b688bbc4080a3410a20bc3.zip
CMake-5f93cf4afea05ffaf7b688bbc4080a3410a20bc3.tar.gz
CMake-5f93cf4afea05ffaf7b688bbc4080a3410a20bc3.tar.bz2
cmFileSet: support makefile-less error reporting of visibility
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;
}