summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.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/cmTargetLinkLibrariesCommand.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/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 36c4ca8..dbea1c3 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -84,6 +84,16 @@ bool cmTargetLinkLibrariesCommand
return true;
}
+ if(this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
+ {
+ cmOStringStream e;
+ e << "Object library target \"" << args[0] << "\" "
+ << "may not link to anything.";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+
// but we might not have any libs after variable expansion
if(args.size() < 2)
{