diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-06-24 12:34:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-24 12:38:02 (GMT) |
commit | c4cc21d20b79d682a99cc28957cf973ebf1993ff (patch) | |
tree | 78ee34dfff4d438391f3a8fc2c7bd865bf7309ab /Source | |
parent | 01fdd421bbd7c3c1d37fd61bfaf0cfe5a756af71 (diff) | |
download | CMake-c4cc21d20b79d682a99cc28957cf973ebf1993ff.zip CMake-c4cc21d20b79d682a99cc28957cf973ebf1993ff.tar.gz CMake-c4cc21d20b79d682a99cc28957cf973ebf1993ff.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a3ccd2b..a191f70 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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"); } |