mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
cxxmodules: Add more suggestions to no-modules-support diagnostics
Tell users what generators *do* support C++ modules. Report the current generator to make clear it is not one of those supporting modules. Also clarify the purpose of the existing documentation references.
This commit is contained in:
@@ -9227,11 +9227,15 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
|
||||
cmGlobalGenerator::CxxModuleSupportQuery::Expected)) {
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat(
|
||||
"The target named \"", this->GetName(),
|
||||
"\" 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."));
|
||||
cmStrCat("The target named \"", this->GetName(),
|
||||
"\" has C++ sources that may use modules, but modules are not "
|
||||
"supported by this generator:\n ",
|
||||
this->GetGlobalGenerator()->GetName(), '\n',
|
||||
"Modules are supported only by Ninja, Ninja Multi-Config, "
|
||||
"and Visual Studio generators for VS 17.4 and newer. "
|
||||
"See the cmake-cxxmodules(7) manual for details. "
|
||||
"Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or "
|
||||
"disable scanning."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9266,8 +9270,9 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
|
||||
cmStrCat("The target named \"", this->GetName(),
|
||||
"\" 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."));
|
||||
"dependencies. See the cmake-cxxmodules(7) manual for "
|
||||
"details. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to "
|
||||
"enable or disable scanning."));
|
||||
} break;
|
||||
case cmGeneratorTarget::Cxx20SupportLevel::Supported:
|
||||
// All is well.
|
||||
|
||||
@@ -3,8 +3,15 @@
|
||||
language has not been enabled\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
The target named "nocxx" 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\.
|
||||
are not supported by this generator:
|
||||
|
||||
[^
|
||||
]+
|
||||
|
||||
Modules are supported only by Ninja, Ninja Multi-Config, and Visual Studio
|
||||
generators for VS 17\.4 and newer\. See the cmake-cxxmodules\(7\) manual for
|
||||
details\. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable
|
||||
scanning\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
Target "nocxx" has source file
|
||||
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
"cxx_std_17"\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
The target named "nocxx20" 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\.
|
||||
modules are not supported by this generator:
|
||||
|
||||
[^
|
||||
]+
|
||||
|
||||
Modules are supported only by Ninja, Ninja Multi-Config, and Visual Studio
|
||||
generators for VS 17\.4 and newer\. See the cmake-cxxmodules\(7\) manual for
|
||||
details\. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable
|
||||
scanning\.
|
||||
)
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
due to lack of required features\. Ninja 1\.11 or higher is required\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
The target named "nodyndep" 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\.
|
||||
modules are not supported by this generator:
|
||||
|
||||
[^
|
||||
]+
|
||||
|
||||
Modules are supported only by Ninja, Ninja Multi-Config, and Visual Studio
|
||||
generators for VS 17\.4 and newer\. See the cmake-cxxmodules\(7\) manual for
|
||||
details\. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable
|
||||
scanning\.
|
||||
)
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
(CMake Error in CMakeLists.txt:
|
||||
The target named "noscanning-sf-property" 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\.
|
||||
graph dependencies\. See the cmake-cxxmodules\(7\) manual for details\. Use
|
||||
the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable scanning\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
The target named "noscanning-sf-property" 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\.
|
||||
modules, but modules are not supported by this generator:
|
||||
|
||||
[^
|
||||
]+
|
||||
|
||||
Modules are supported only by Ninja, Ninja Multi-Config, and Visual Studio
|
||||
generators for VS 17\.4 and newer\. See the cmake-cxxmodules\(7\) manual for
|
||||
details\. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable
|
||||
scanning\.
|
||||
)
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
(CMake Error in CMakeLists.txt:
|
||||
The target named "noscanning-target-property" 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\.
|
||||
graph dependencies\. See the cmake-cxxmodules\(7\) manual for details\. Use
|
||||
the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable scanning\.
|
||||
|CMake Error in CMakeLists.txt:
|
||||
The target named "noscanning-target-property" 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\.
|
||||
modules, but modules are not supported by this generator:
|
||||
|
||||
[^
|
||||
]+
|
||||
|
||||
Modules are supported only by Ninja, Ninja Multi-Config, and Visual Studio
|
||||
generators for VS 17\.4 and newer\. See the cmake-cxxmodules\(7\) manual for
|
||||
details\. Use the CMAKE_CXX_SCAN_FOR_MODULES variable to enable or disable
|
||||
scanning\.
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user