summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-11-20 09:58:15 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 00:07:27 (GMT)
commit435c912848b08333e03c74439f725c9b96890d80 (patch)
treeef1aaad7af3149558792db8209feef24e31f509a /Source/cmAddLibraryCommand.cxx
parentfe732264e9abb6249d1d112b24ce36b226590105 (diff)
downloadCMake-435c912848b08333e03c74439f725c9b96890d80.zip
CMake-435c912848b08333e03c74439f725c9b96890d80.tar.gz
CMake-435c912848b08333e03c74439f725c9b96890d80.tar.bz2
export: Add support for INTERFACE_LIBRARY targets
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 130a033..0e61c99 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -220,6 +220,16 @@ bool cmAddLibraryCommand
);
return true;
}
+ if(type == cmTarget::INTERFACE_LIBRARY)
+ {
+ if (!cmGeneratorExpression::IsValidTargetName(libName))
+ {
+ cmOStringStream e;
+ e << "Invalid name for IMPORTED INTERFACE library target: " << libName;
+ this->SetError(e.str().c_str());
+ return false;
+ }
+ }
// Make sure the target does not already exist.
if(this->Makefile->FindTargetToUse(libName.c_str()))