diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-22 22:02:46 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-27 12:56:46 (GMT) |
commit | 5f93cf4afea05ffaf7b688bbc4080a3410a20bc3 (patch) | |
tree | 0aba5ffe360397fbbe8cd1b01c4b0e5ff4f1a4cc /Source/cmFileSet.cxx | |
parent | 4b63f2ca4aeda1206012942378463ec2894991c2 (diff) | |
download | CMake-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.cxx | 9 |
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; } |