mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Allow OBJECT libraries to be installed, exported, and imported
Teach install() and export() to handle the actual object files. Disallow this on Xcode with multiple architectures because it still cannot be cleanly supported there. Co-Author: Brad King <brad.king@kitware.com>
This commit is contained in:
committed by
Brad King
parent
93c89bc75c
commit
eec93bceec
@@ -297,10 +297,15 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
if (type == cmStateEnums::OBJECT_LIBRARY) {
|
||||
this->Makefile->IssueMessage(
|
||||
cmake::FATAL_ERROR,
|
||||
"The OBJECT library type may not be used for IMPORTED libraries.");
|
||||
return true;
|
||||
std::string reason;
|
||||
if (!this->Makefile->GetGlobalGenerator()->HasKnownObjectFileLocation(
|
||||
&reason)) {
|
||||
this->Makefile->IssueMessage(
|
||||
cmake::FATAL_ERROR,
|
||||
"The OBJECT library type may not be used for IMPORTED libraries" +
|
||||
reason + ".");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (type == cmStateEnums::INTERFACE_LIBRARY) {
|
||||
if (!cmGeneratorExpression::IsValidTargetName(libName)) {
|
||||
|
||||
Reference in New Issue
Block a user