mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 15:18:26 -05:00
cmTarget: Move link type enum out.
Remove a reason for generate time code to depend on the cmTarget header/type.
This commit is contained in:
@@ -136,7 +136,7 @@ bool cmTargetLinkLibrariesCommand
|
||||
}
|
||||
|
||||
// Keep track of link configuration specifiers.
|
||||
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
|
||||
cmTargetLinkLibraryType llt = GENERAL_LibraryType;
|
||||
bool haveLLT = false;
|
||||
|
||||
// Start with primary linking and switch to link interface
|
||||
@@ -242,27 +242,27 @@ bool cmTargetLinkLibrariesCommand
|
||||
{
|
||||
if(haveLLT)
|
||||
{
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::DEBUG);
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, DEBUG_LibraryType);
|
||||
}
|
||||
llt = cmTarget::DEBUG;
|
||||
llt = DEBUG_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(args[i] == "optimized")
|
||||
{
|
||||
if(haveLLT)
|
||||
{
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::OPTIMIZED);
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, OPTIMIZED_LibraryType);
|
||||
}
|
||||
llt = cmTarget::OPTIMIZED;
|
||||
llt = OPTIMIZED_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(args[i] == "general")
|
||||
{
|
||||
if(haveLLT)
|
||||
{
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::GENERAL);
|
||||
this->LinkLibraryTypeSpecifierWarning(llt, GENERAL_LibraryType);
|
||||
}
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(haveLLT)
|
||||
@@ -282,7 +282,7 @@ bool cmTargetLinkLibrariesCommand
|
||||
// specifed that a library is both debug and optimized. (this check is
|
||||
// only there for backwards compatibility when mixing projects built
|
||||
// with old versions of CMake and new)
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
std::string linkType = args[0];
|
||||
linkType += "_LINK_TYPE";
|
||||
const char* linkTypeString =
|
||||
@@ -291,11 +291,11 @@ bool cmTargetLinkLibrariesCommand
|
||||
{
|
||||
if(strcmp(linkTypeString, "debug") == 0)
|
||||
{
|
||||
llt = cmTarget::DEBUG;
|
||||
llt = DEBUG_LibraryType;
|
||||
}
|
||||
if(strcmp(linkTypeString, "optimized") == 0)
|
||||
{
|
||||
llt = cmTarget::OPTIMIZED;
|
||||
llt = OPTIMIZED_LibraryType;
|
||||
}
|
||||
}
|
||||
if (!this->HandleLibrary(args[i], llt))
|
||||
@@ -350,7 +350,7 @@ cmTargetLinkLibrariesCommand
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
cmTarget::LinkLibraryType llt)
|
||||
cmTargetLinkLibraryType llt)
|
||||
{
|
||||
if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
&& this->CurrentProcessingState != ProcessingKeywordLinkInterface)
|
||||
@@ -469,7 +469,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
std::string prop;
|
||||
|
||||
// Include this library in the link interface for the target.
|
||||
if(llt == cmTarget::DEBUG || llt == cmTarget::GENERAL)
|
||||
if(llt == DEBUG_LibraryType || llt == GENERAL_LibraryType)
|
||||
{
|
||||
// Put in the DEBUG configuration interfaces.
|
||||
for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
|
||||
@@ -480,7 +480,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
this->Target->AppendProperty(prop, lib.c_str());
|
||||
}
|
||||
}
|
||||
if(llt == cmTarget::OPTIMIZED || llt == cmTarget::GENERAL)
|
||||
if(llt == OPTIMIZED_LibraryType || llt == GENERAL_LibraryType)
|
||||
{
|
||||
// Put in the non-DEBUG configuration interfaces.
|
||||
this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib.c_str());
|
||||
|
||||
Reference in New Issue
Block a user