assert failed in cmgeneratortarget.cxx with version 3.10.1
in file cmgeneratortarget.cxx line 1829
cmGeneratorTarget::ComputeLinkClosure(const std::string& config,
LinkClosure& lc) const
{
//...
cmLinkImplementation const* impl = this->GetLinkImplementation(config);
assert(impl);
but at line 4696
const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation(
const std::string& config) const
{
// There is no link implementation for imported targets.
if (this->IsImported()) {
return nullptr;
}
leads assertion failed, full backtrace as following:
cmGeneratorTarget::ComputeLinkClosure+0xb9 [cmgeneratortarget.cxx @ 1838]
cmGeneratorTarget::GetLinkClosure+0x112 [cmgeneratortarget.cxx @ 1776]
cmGeneratorTarget::GetLinkerLanguage+0x3f [cmgeneratortarget.cxx @ 3246]
cmComputeLinkInformation::cmComputeLinkInformation+0x580 [cmcomputelinkinformation.cxx @ 266]
cmGeneratorTarget::GetLinkInformation+0x121 [cmgeneratortarget.cxx @ 4021]
getCompatibleInterfaceProperties+0x78 [cmexportfilegenerator.cxx @ 447]
cmExportFileGenerator::PopulateCompatibleInterfaceProperties+0x2a7 [cmexportfilegenerator.cxx @ 498]
cmExportBuildFileGenerator::GenerateMainFile+0x860 [cmexportbuildfilegenerator.cxx @ 110]
cmExportFileGenerator::GenerateImportFile+0x376 [cmexportfilegenerator.cxx @ 94]
cmGlobalGenerator::Generate+0x37e [cmglobalgenerator.cxx @ 1343]
cmGlobalNinjaGenerator::Generate+0x3db [cmglobalninjagenerator.cxx @ 549]
cmake::Generate+0x92 [cmake.cxx @ 1603]
cmake::Run+0x2e8 [cmake.cxx @ 1587]
do_cmake+0x901 [cmakemain.cxx @ 311]