mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 10:20:56 -06:00
cmVisualStudio10TargetGenerator: Do not segfault on empty config
The VS generator should error out earlier when no configurations are specified, but for now cover this symptom.
This commit is contained in:
committed by
Brad King
parent
01fdd421bb
commit
c4cc21d20b
@@ -4131,8 +4131,9 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
|
||||
}
|
||||
|
||||
// Don't reference targets that don't produce any output.
|
||||
if (dt->GetManagedType(this->Configurations[0]) ==
|
||||
cmGeneratorTarget::ManagedType::Undefined) {
|
||||
if (this->Configurations.empty() ||
|
||||
dt->GetManagedType(this->Configurations[0]) ==
|
||||
cmGeneratorTarget::ManagedType::Undefined) {
|
||||
e2.Element("ReferenceOutputAssembly", "false");
|
||||
e2.Element("CopyToOutputDirectory", "Never");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user