mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
export(): Check targets exist at configure-time (#14608)
Commit 66b290e7 (export(): Process the export() command at generate
time., 2012-10-06 ) refactored export() so that it could evaluate
strings at generate-time. This was intended for evaluating target
properties, but that commit also removed a check for target
existence at configure-time. Restore that check and add a test for
this case.
This commit is contained in:
@@ -135,6 +135,14 @@ bool cmExportCommand
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "given target \"" << *currentTarget
|
||||
<< "\" which is not built by this project.";
|
||||
this->SetError(e.str().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
|
||||
|
||||
Reference in New Issue
Block a user