summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-10-16 19:42:21 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-10-17 18:46:57 (GMT)
commitbadb6ab120bb3bb01c6b41e50aadb234d16e8e21 (patch)
treedf70d5268d5584161646a79ae501ad924c8f67d6 /Source/cmVisualStudio10TargetGenerator.cxx
parent7080b4ae8354b9e8deada0f35ff02a1bc1cc13a7 (diff)
downloadCMake-badb6ab120bb3bb01c6b41e50aadb234d16e8e21.zip
CMake-badb6ab120bb3bb01c6b41e50aadb234d16e8e21.tar.gz
CMake-badb6ab120bb3bb01c6b41e50aadb234d16e8e21.tar.bz2
VS: Explicitly disallow C++ modules provided by imported targets
The `-ifcOnly` flag is understood by MSBuild, but there are unresolved questions about how to integrate with with CMake's model. See: #25328
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ce94fe1..4860d9a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -358,6 +358,15 @@ std::ostream& cmVisualStudio10TargetGenerator::Elem::WriteString(
void cmVisualStudio10TargetGenerator::Generate()
{
+ if (this->GeneratorTarget->IsSynthetic()) {
+ this->GeneratorTarget->Makefile->IssueMessage(
+ MessageType::FATAL_ERROR,
+ cmStrCat("Target \"", this->GeneratorTarget->GetName(),
+ "\" contains C++ modules intended for BMI-only compilation. "
+ "This is not yet supported by the Visual Studio generator."));
+ return;
+ }
+
for (std::string const& config : this->Configurations) {
this->GeneratorTarget->CheckCxxModuleStatus(config);
}