summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-10-10 13:58:32 (GMT)
committerBrad King <brad.king@kitware.com>2023-10-11 13:52:41 (GMT)
commit32438138c331bc0bc24b47c9ac0cc93c8298c8d5 (patch)
treecd6f3c90d73e1524d1686e4ebf4e8cba583f9ba9 /Source
parent604466b83e0c54640c15d00909cbdbe747a47965 (diff)
downloadCMake-32438138c331bc0bc24b47c9ac0cc93c8298c8d5.zip
CMake-32438138c331bc0bc24b47c9ac0cc93c8298c8d5.tar.gz
CMake-32438138c331bc0bc24b47c9ac0cc93c8298c8d5.tar.bz2
cxxmodules: Reference documentation in no-modules-support diagnostics
Help users avoid errors about module support when they may not need it. While at it, polish sentence syntax in the diagnostic messages.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 01af14f..2ea18bd 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -9195,8 +9195,9 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
MessageType::FATAL_ERROR,
cmStrCat(
"The target named \"", this->GetName(),
- "\" contains C++ "
- "sources that use modules which is not supported by the generator"));
+ "\" has C++ sources that may use modules, but modules are not "
+ "supported by this generator. See the cmake-cxxmodules(7) manual "
+ "and the CMAKE_CXX_SCAN_FOR_MODULES variable."));
return;
}
@@ -9205,8 +9206,8 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
cmStrCat("The target named \"", this->GetName(),
- "\" has C++ sources that use modules but the \"CXX\" "
- "language has not been enabled"));
+ "\" has C++ sources that use modules, but the \"CXX\" "
+ "language has not been enabled."));
break;
case cmGeneratorTarget::Cxx20SupportLevel::NoCxx20: {
cmStandardLevelResolver standardResolver(this->Makefile);
@@ -9221,17 +9222,18 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
MessageType::FATAL_ERROR,
cmStrCat(
"The target named \"", this->GetName(),
- "\" has C++ sources that use modules but does not include "
+ "\" has C++ sources that use modules, but does not include "
"\"cxx_std_20\" (or newer) among its `target_compile_features`",
- effStandard));
+ effStandard, '.'));
} break;
case cmGeneratorTarget::Cxx20SupportLevel::MissingRule: {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,
cmStrCat("The target named \"", this->GetName(),
- "\" has C++ sources that use modules but the compiler does "
- "not provide a way to discover the import graph "
- "dependencies"));
+ "\" has C++ sources that may use modules, but the compiler "
+ "does not provide a way to discover the import graph "
+ "dependencies. See the cmake-cxxmodules(7) manual "
+ "and the CMAKE_CXX_SCAN_FOR_MODULES variable."));
} break;
case cmGeneratorTarget::Cxx20SupportLevel::Supported:
// All is well.