mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
Reject TARGET_PDB_FILE for imported targets instead of crashing
Reported-by: Justin Borodinsky <justin.borodinsky@gmail.com>
This commit is contained in:
@@ -1600,6 +1600,13 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
|
||||
cmGeneratorExpressionContext *context,
|
||||
const GeneratorExpressionContent *content)
|
||||
{
|
||||
if (target->IsImported())
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"TARGET_PDB_FILE not allowed for IMPORTED targets.");
|
||||
return std::string();
|
||||
}
|
||||
|
||||
std::string language = target->GetLinkerLanguage(context->Config);
|
||||
|
||||
std::string pdbSupportVar = "CMAKE_" + language + "_LINKER_SUPPORTS_PDB";
|
||||
|
||||
Reference in New Issue
Block a user