summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-13 13:22:24 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-16 14:18:01 (GMT)
commitc68cc0661218c62f32d11cb600183e645c81a3de (patch)
treef5f9ed60ee709ba8d5adc97e38e41dbfe4aab9cf /Source/cmAddLibraryCommand.cxx
parent48eb7fc7d7b3fa5570a7b32968fa2cff07bf6fe7 (diff)
parent3a53005f7dd5e582b855ef1f3c0e6814ce7d024a (diff)
downloadCMake-c68cc0661218c62f32d11cb600183e645c81a3de.zip
CMake-c68cc0661218c62f32d11cb600183e645c81a3de.tar.gz
CMake-c68cc0661218c62f32d11cb600183e645c81a3de.tar.bz2
Merge branch 'object-library' into ninja-object-library
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 9a776fb..c1d0e9d 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -64,6 +64,12 @@ bool cmAddLibraryCommand
type = cmTarget::MODULE_LIBRARY;
haveSpecifiedType = true;
}
+ else if(libType == "OBJECT")
+ {
+ ++s;
+ type = cmTarget::OBJECT_LIBRARY;
+ haveSpecifiedType = true;
+ }
else if(libType == "UNKNOWN")
{
++s;
@@ -118,6 +124,14 @@ bool cmAddLibraryCommand
this->SetError("called with IMPORTED argument but no library type.");
return false;
}
+ if(type == cmTarget::OBJECT_LIBRARY)
+ {
+ this->Makefile->IssueMessage(
+ cmake::FATAL_ERROR,
+ "The OBJECT library type may not be used for IMPORTED libraries."
+ );
+ return true;
+ }
// Make sure the target does not already exist.
if(this->Makefile->FindTargetToUse(libName.c_str()))