add_library: Issue better diagnostic for INTERFACE GLOBAL signature.

This commit is contained in:
Stephen Kelly
2014-02-07 15:31:57 +01:00
parent 770245e928
commit 6d85a6a64c
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -173,6 +173,13 @@ bool cmAddLibraryCommand
++s;
importGlobal = true;
}
else if(type == cmTarget::INTERFACE_LIBRARY && *s == "GLOBAL")
{
cmOStringStream e;
e << "GLOBAL option may only be used with IMPORTED libraries.";
this->SetError(e.str().c_str());
return false;
}
else
{
break;