Merge topic 'clean-up-cmTarget'
55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
This commit is contained in:
commit
f13521317a
@ -174,8 +174,8 @@ bool cmAddExecutableCommand
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget::TargetType type = aliasedTarget->GetType();
|
||||
if(type != cmTarget::EXECUTABLE)
|
||||
cmState::TargetType type = aliasedTarget->GetType();
|
||||
if(type != cmState::EXECUTABLE)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "cannot create ALIAS target \"" << exename
|
||||
@ -210,7 +210,7 @@ bool cmAddExecutableCommand
|
||||
}
|
||||
|
||||
// Create the imported target.
|
||||
this->Makefile->AddImportedTarget(exename, cmTarget::EXECUTABLE,
|
||||
this->Makefile->AddImportedTarget(exename, cmState::EXECUTABLE,
|
||||
importGlobal);
|
||||
return true;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ bool cmAddLibraryCommand
|
||||
}
|
||||
// Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
|
||||
// otherwise it defaults to static library.
|
||||
cmTarget::TargetType type = cmTarget::SHARED_LIBRARY;
|
||||
cmState::TargetType type = cmState::SHARED_LIBRARY;
|
||||
if (cmSystemTools::IsOff(this->Makefile->GetDefinition("BUILD_SHARED_LIBS")))
|
||||
{
|
||||
type = cmTarget::STATIC_LIBRARY;
|
||||
type = cmState::STATIC_LIBRARY;
|
||||
}
|
||||
bool excludeFromAll = false;
|
||||
bool importTarget = false;
|
||||
@ -50,7 +50,7 @@ bool cmAddLibraryCommand
|
||||
std::string libType = *s;
|
||||
if(libType == "STATIC")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting STATIC type.";
|
||||
@ -58,12 +58,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::STATIC_LIBRARY;
|
||||
type = cmState::STATIC_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(libType == "SHARED")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting SHARED type.";
|
||||
@ -71,12 +71,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::SHARED_LIBRARY;
|
||||
type = cmState::SHARED_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(libType == "MODULE")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting MODULE type.";
|
||||
@ -84,12 +84,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::MODULE_LIBRARY;
|
||||
type = cmState::MODULE_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(libType == "OBJECT")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting OBJECT type.";
|
||||
@ -97,12 +97,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::OBJECT_LIBRARY;
|
||||
type = cmState::OBJECT_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(libType == "UNKNOWN")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting UNKNOWN type.";
|
||||
@ -110,12 +110,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::UNKNOWN_LIBRARY;
|
||||
type = cmState::UNKNOWN_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(libType == "ALIAS")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library specified with conflicting ALIAS type.";
|
||||
@ -149,12 +149,12 @@ bool cmAddLibraryCommand
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
type = cmTarget::INTERFACE_LIBRARY;
|
||||
type = cmState::INTERFACE_LIBRARY;
|
||||
haveSpecifiedType = true;
|
||||
}
|
||||
else if(*s == "EXCLUDE_FROM_ALL")
|
||||
{
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
||||
@ -174,7 +174,7 @@ bool cmAddLibraryCommand
|
||||
++s;
|
||||
importGlobal = true;
|
||||
}
|
||||
else if(type == cmTarget::INTERFACE_LIBRARY && *s == "GLOBAL")
|
||||
else if(type == cmState::INTERFACE_LIBRARY && *s == "GLOBAL")
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "GLOBAL option may only be used with IMPORTED libraries.";
|
||||
@ -187,7 +187,7 @@ bool cmAddLibraryCommand
|
||||
}
|
||||
}
|
||||
|
||||
if (type == cmTarget::INTERFACE_LIBRARY)
|
||||
if (type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
if (s != args.end())
|
||||
{
|
||||
@ -220,7 +220,7 @@ bool cmAddLibraryCommand
|
||||
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
|
||||
{
|
||||
case cmPolicies::WARN:
|
||||
if(type != cmTarget::INTERFACE_LIBRARY)
|
||||
if(type != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0037) << "\n";
|
||||
issueMessage = true;
|
||||
@ -293,12 +293,12 @@ bool cmAddLibraryCommand
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget::TargetType aliasedType = aliasedTarget->GetType();
|
||||
if(aliasedType != cmTarget::SHARED_LIBRARY
|
||||
&& aliasedType != cmTarget::STATIC_LIBRARY
|
||||
&& aliasedType != cmTarget::MODULE_LIBRARY
|
||||
&& aliasedType != cmTarget::OBJECT_LIBRARY
|
||||
&& aliasedType != cmTarget::INTERFACE_LIBRARY)
|
||||
cmState::TargetType aliasedType = aliasedTarget->GetType();
|
||||
if(aliasedType != cmState::SHARED_LIBRARY
|
||||
&& aliasedType != cmState::STATIC_LIBRARY
|
||||
&& aliasedType != cmState::MODULE_LIBRARY
|
||||
&& aliasedType != cmState::OBJECT_LIBRARY
|
||||
&& aliasedType != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "cannot create ALIAS target \"" << libName
|
||||
@ -328,19 +328,19 @@ bool cmAddLibraryCommand
|
||||
CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to
|
||||
STATIC. But at this point we know only the name of the target, but not
|
||||
yet its linker language. */
|
||||
if ((type == cmTarget::SHARED_LIBRARY ||
|
||||
type == cmTarget::MODULE_LIBRARY) &&
|
||||
if ((type == cmState::SHARED_LIBRARY ||
|
||||
type == cmState::MODULE_LIBRARY) &&
|
||||
(this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||
"TARGET_SUPPORTS_SHARED_LIBS") == false))
|
||||
{
|
||||
std::ostringstream w;
|
||||
w <<
|
||||
"ADD_LIBRARY called with " <<
|
||||
(type==cmTarget::SHARED_LIBRARY ? "SHARED" : "MODULE") <<
|
||||
(type==cmState::SHARED_LIBRARY ? "SHARED" : "MODULE") <<
|
||||
" option but the target platform does not support dynamic linking. "
|
||||
"Building a STATIC library instead. This may lead to problems.";
|
||||
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
|
||||
type = cmTarget::STATIC_LIBRARY;
|
||||
type = cmState::STATIC_LIBRARY;
|
||||
}
|
||||
|
||||
// Handle imported target creation.
|
||||
@ -352,7 +352,7 @@ bool cmAddLibraryCommand
|
||||
this->SetError("called with IMPORTED argument but no library type.");
|
||||
return false;
|
||||
}
|
||||
if(type == cmTarget::OBJECT_LIBRARY)
|
||||
if(type == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
this->Makefile->IssueMessage(
|
||||
cmake::FATAL_ERROR,
|
||||
@ -360,7 +360,7 @@ bool cmAddLibraryCommand
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if(type == cmTarget::INTERFACE_LIBRARY)
|
||||
if(type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
if (!cmGeneratorExpression::IsValidTargetName(libName))
|
||||
{
|
||||
@ -387,7 +387,7 @@ bool cmAddLibraryCommand
|
||||
}
|
||||
|
||||
// A non-imported target may not have UNKNOWN type.
|
||||
if(type == cmTarget::UNKNOWN_LIBRARY)
|
||||
if(type == cmState::UNKNOWN_LIBRARY)
|
||||
{
|
||||
this->Makefile->IssueMessage(
|
||||
cmake::FATAL_ERROR,
|
||||
@ -408,7 +408,7 @@ bool cmAddLibraryCommand
|
||||
|
||||
std::vector<std::string> srclists;
|
||||
|
||||
if(type == cmTarget::INTERFACE_LIBRARY)
|
||||
if(type == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
if (!cmGeneratorExpression::IsValidTargetName(libName)
|
||||
|| libName.find("::") != std::string::npos)
|
||||
|
@ -373,13 +373,13 @@ void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt,
|
||||
switch (libtype)
|
||||
{
|
||||
case CM_LIBRARY_GENERAL:
|
||||
mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL);
|
||||
mf->AddLinkLibraryForTarget(tgt,value, GENERAL_LibraryType);
|
||||
break;
|
||||
case CM_LIBRARY_DEBUG:
|
||||
mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG);
|
||||
mf->AddLinkLibraryForTarget(tgt,value, DEBUG_LibraryType);
|
||||
break;
|
||||
case CM_LIBRARY_OPTIMIZED:
|
||||
mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED);
|
||||
mf->AddLinkLibraryForTarget(tgt,value, OPTIMIZED_LibraryType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -395,7 +395,7 @@ void CCONV cmAddLibrary(void *arg, const char *libname, int shared,
|
||||
srcs2.push_back(srcs[i]);
|
||||
}
|
||||
mf->AddLibrary(libname,
|
||||
(shared? cmTarget::SHARED_LIBRARY : cmTarget::STATIC_LIBRARY),
|
||||
(shared? cmState::SHARED_LIBRARY : cmState::STATIC_LIBRARY),
|
||||
srcs2);
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const
|
||||
// We can ignore the INTERFACE_LIBRARY items because
|
||||
// Target->GetLinkInformation already processed their
|
||||
// link interface and they don't have any output themselves.
|
||||
&& linkee->GetType() != cmTarget::INTERFACE_LIBRARY
|
||||
&& linkee->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& emitted.insert(linkee).second)
|
||||
{
|
||||
cmLocalGenerator* lg = linkee->GetLocalGenerator();
|
||||
|
@ -270,7 +270,7 @@ cmComputeLinkDepends::Compute()
|
||||
LinkEntry const& e = this->EntryList[i];
|
||||
cmGeneratorTarget const* t = e.Target;
|
||||
// Entries that we know the linker will re-use do not need to be repeated.
|
||||
bool uniquify = t && t->GetType() == cmTarget::SHARED_LIBRARY;
|
||||
bool uniquify = t && t->GetType() == cmState::SHARED_LIBRARY;
|
||||
if(!uniquify || emmitted.insert(i).second)
|
||||
{
|
||||
this->FinalLinkEntries.push_back(e);
|
||||
@ -367,7 +367,7 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
|
||||
entry.Target->GetLinkInterface(this->Config, this->Target))
|
||||
{
|
||||
const bool isIface =
|
||||
entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY;
|
||||
entry.Target->GetType() == cmState::INTERFACE_LIBRARY;
|
||||
// This target provides its own link interface information.
|
||||
this->AddLinkEntries(depender_index, iface->Libraries);
|
||||
|
||||
@ -482,24 +482,24 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
|
||||
|
||||
// Look for entries meant for this configuration.
|
||||
std::vector<cmLinkItem> actual_libs;
|
||||
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
|
||||
cmTargetLinkLibraryType llt = GENERAL_LibraryType;
|
||||
bool haveLLT = false;
|
||||
for(std::vector<std::string>::const_iterator di = deplist.begin();
|
||||
di != deplist.end(); ++di)
|
||||
{
|
||||
if(*di == "debug")
|
||||
{
|
||||
llt = cmTarget::DEBUG;
|
||||
llt = DEBUG_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(*di == "optimized")
|
||||
{
|
||||
llt = cmTarget::OPTIMIZED;
|
||||
llt = OPTIMIZED_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(*di == "general")
|
||||
{
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
haveLLT = true;
|
||||
}
|
||||
else if(!di->empty())
|
||||
@ -517,17 +517,17 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
|
||||
{
|
||||
if(strcmp(val, "debug") == 0)
|
||||
{
|
||||
llt = cmTarget::DEBUG;
|
||||
llt = DEBUG_LibraryType;
|
||||
}
|
||||
else if(strcmp(val, "optimized") == 0)
|
||||
{
|
||||
llt = cmTarget::OPTIMIZED;
|
||||
llt = OPTIMIZED_LibraryType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the library is meant for this link type then use it.
|
||||
if(llt == cmTarget::GENERAL || llt == this->LinkType)
|
||||
if(llt == GENERAL_LibraryType || llt == this->LinkType)
|
||||
{
|
||||
cmLinkItem item(*di, this->FindTargetToLink(depender_index, *di));
|
||||
actual_libs.push_back(item);
|
||||
@ -539,7 +539,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
|
||||
}
|
||||
|
||||
// Reset the link type until another explicit type is given.
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
haveLLT = false;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ private:
|
||||
void CheckWrongConfigItem(cmLinkItem const& item);
|
||||
|
||||
int ComponentOrderId;
|
||||
cmTarget::LinkLibraryType LinkType;
|
||||
cmTargetLinkLibraryType LinkType;
|
||||
bool HasConfig;
|
||||
bool DebugMode;
|
||||
bool OldLinkDirMode;
|
||||
|
@ -290,7 +290,7 @@ cmComputeLinkInformation
|
||||
// the program that will load it.
|
||||
this->LoaderFlag = 0;
|
||||
if(!this->UseImportLibrary &&
|
||||
this->Target->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
this->Target->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
|
||||
loader_flag_var += this->LinkLanguage;
|
||||
@ -308,10 +308,10 @@ cmComputeLinkInformation
|
||||
|
||||
// Get options needed to specify RPATHs.
|
||||
this->RuntimeUseChrpath = false;
|
||||
if(this->Target->Target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(this->Target->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
const char* tType =
|
||||
((this->Target->Target->GetType() == cmTarget::EXECUTABLE)?
|
||||
((this->Target->GetType() == cmState::EXECUTABLE)?
|
||||
"EXECUTABLE" : "SHARED_LIBRARY");
|
||||
std::string rtVar = "CMAKE_";
|
||||
rtVar += tType;
|
||||
@ -480,10 +480,10 @@ cmComputeLinkInformation::GetSharedLibrariesLinked()
|
||||
bool cmComputeLinkInformation::Compute()
|
||||
{
|
||||
// Skip targets that do not link.
|
||||
if(!(this->Target->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::STATIC_LIBRARY))
|
||||
if(!(this->Target->GetType() == cmState::EXECUTABLE ||
|
||||
this->Target->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->Target->GetType() == cmState::STATIC_LIBRARY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -544,7 +544,7 @@ bool cmComputeLinkInformation::Compute()
|
||||
cmGeneratorTarget const* tgt = *i;
|
||||
bool implib =
|
||||
(this->UseImportLibrary &&
|
||||
(tgt->GetType() == cmTarget::SHARED_LIBRARY));
|
||||
(tgt->GetType() == cmState::SHARED_LIBRARY));
|
||||
std::string lib = tgt->GetFullPath(this->Config , implib, true);
|
||||
this->OldLinkDirItems.push_back(lib);
|
||||
}
|
||||
@ -660,7 +660,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
|
||||
this->Items.push_back(Item(linkItem, true, tgt));
|
||||
this->Depends.push_back(exe);
|
||||
}
|
||||
else if(tgt->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
else if(tgt->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
// Add the interface library as an item so it can be considered as part
|
||||
// of COMPATIBLE_INTERFACE_ enforcement. The generators will ignore
|
||||
@ -672,12 +672,12 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
|
||||
// Decide whether to use an import library.
|
||||
bool implib =
|
||||
(this->UseImportLibrary &&
|
||||
(impexe || tgt->GetType() == cmTarget::SHARED_LIBRARY));
|
||||
(impexe || tgt->GetType() == cmState::SHARED_LIBRARY));
|
||||
|
||||
// Pass the full path to the target file.
|
||||
std::string lib = tgt->GetFullPath(config, implib, true);
|
||||
if(!this->LinkDependsNoShared ||
|
||||
tgt->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
tgt->GetType() != cmState::SHARED_LIBRARY)
|
||||
{
|
||||
this->Depends.push_back(lib);
|
||||
}
|
||||
@ -728,7 +728,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
|
||||
{
|
||||
// The target will provide a full path. Make sure it is a shared
|
||||
// library.
|
||||
if(tgt->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
if(tgt->GetType() != cmState::SHARED_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -818,9 +818,9 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
|
||||
const char* target_type_str = 0;
|
||||
switch(this->Target->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE: target_type_str = "EXE"; break;
|
||||
case cmTarget::SHARED_LIBRARY: target_type_str = "SHARED_LIBRARY"; break;
|
||||
case cmTarget::MODULE_LIBRARY: target_type_str = "SHARED_MODULE"; break;
|
||||
case cmState::EXECUTABLE: target_type_str = "EXE"; break;
|
||||
case cmState::SHARED_LIBRARY: target_type_str = "SHARED_LIBRARY"; break;
|
||||
case cmState::MODULE_LIBRARY: target_type_str = "SHARED_MODULE"; break;
|
||||
default: break;
|
||||
}
|
||||
if(target_type_str)
|
||||
@ -1084,13 +1084,13 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
|
||||
// shared and static libraries but static-mode can handle only
|
||||
// static libraries. If a previous user item changed the link type
|
||||
// to static we need to make sure it is back to shared.
|
||||
if(target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(target->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
this->SetCurrentLinkType(LinkShared);
|
||||
}
|
||||
|
||||
// Keep track of shared library targets linked.
|
||||
if(target->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(target->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
this->SharedLibrariesLinked.insert(target);
|
||||
}
|
||||
@ -1790,14 +1790,14 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
|
||||
|
||||
// Libraries with unknown type must be handled using just the file
|
||||
// on disk.
|
||||
if(target->GetType() == cmTarget::UNKNOWN_LIBRARY)
|
||||
if(target->GetType() == cmState::UNKNOWN_LIBRARY)
|
||||
{
|
||||
this->AddLibraryRuntimeInfo(fullPath);
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip targets that are not shared libraries (modules cannot be linked).
|
||||
if(target->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
if(target->GetType() != cmState::SHARED_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
{
|
||||
// Get the depender.
|
||||
cmGeneratorTarget const* depender = this->Targets[depender_index];
|
||||
if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (depender->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -236,10 +236,10 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
std::string objLib = (*oi)->GetObjectLibrary();
|
||||
if (!objLib.empty() && emitted.insert(objLib).second)
|
||||
{
|
||||
if(depender->GetType() != cmTarget::EXECUTABLE &&
|
||||
depender->GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
depender->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
depender->GetType() != cmTarget::MODULE_LIBRARY)
|
||||
if(depender->GetType() != cmState::EXECUTABLE &&
|
||||
depender->GetType() != cmState::STATIC_LIBRARY &&
|
||||
depender->GetType() != cmState::SHARED_LIBRARY &&
|
||||
depender->GetType() != cmState::MODULE_LIBRARY)
|
||||
{
|
||||
this->GlobalGenerator->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR,
|
||||
@ -324,7 +324,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
|
||||
// name conflict between an external library and an executable
|
||||
// within the project.
|
||||
if(dependee &&
|
||||
dependee->GetType() == cmTarget::EXECUTABLE &&
|
||||
dependee->GetType() == cmState::EXECUTABLE &&
|
||||
!dependee->Target->IsExecutableWithExports())
|
||||
{
|
||||
dependee = 0;
|
||||
@ -357,7 +357,7 @@ void cmComputeTargetDepends::AddTargetDepend(
|
||||
cmGeneratorTarget const* dependee = dependee_name.Target;
|
||||
|
||||
if(!dependee && !linking &&
|
||||
(depender->GetType() != cmTarget::GLOBAL_TARGET))
|
||||
(depender->GetType() != cmState::GLOBAL_TARGET))
|
||||
{
|
||||
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
|
||||
bool issueMessage = false;
|
||||
@ -400,7 +400,7 @@ void cmComputeTargetDepends::AddTargetDepend(
|
||||
// name conflict between an external library and an executable
|
||||
// within the project.
|
||||
if(linking && dependee &&
|
||||
dependee->GetType() == cmTarget::EXECUTABLE &&
|
||||
dependee->GetType() == cmState::EXECUTABLE &&
|
||||
!dependee->Target->IsExecutableWithExports())
|
||||
{
|
||||
dependee = 0;
|
||||
@ -418,7 +418,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
|
||||
bool linking)
|
||||
{
|
||||
if(dependee->Target->IsImported() ||
|
||||
dependee->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
dependee->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
// Skip IMPORTED and INTERFACE targets but follow their utility
|
||||
// dependencies.
|
||||
@ -523,7 +523,7 @@ cmComputeTargetDepends
|
||||
// Make sure the component is all STATIC_LIBRARY targets.
|
||||
for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
|
||||
{
|
||||
if(this->Targets[*ni]->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(this->Targets[*ni]->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
this->ComplainAboutBadComponent(ccg, c);
|
||||
return false;
|
||||
@ -554,7 +554,7 @@ cmComputeTargetDepends
|
||||
|
||||
// Describe the depender.
|
||||
e << " \"" << depender->GetName() << "\" of type "
|
||||
<< cmTarget::GetTargetTypeName(depender->Target->GetType()) << "\n";
|
||||
<< cmState::GetTargetTypeName(depender->GetType()) << "\n";
|
||||
|
||||
// List its dependencies that are inside the component.
|
||||
EdgeList const& nl = this->InitialGraph[i];
|
||||
|
@ -93,12 +93,12 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
{
|
||||
switch(tgt->GetType())
|
||||
{
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
if (tgt->IsExecutableWithExports())
|
||||
{
|
||||
break;
|
||||
@ -107,7 +107,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
||||
"Only libraries may be used as try_compile or try_run IMPORTED "
|
||||
"LINK_LIBRARIES. Got " + std::string(tgt->GetName()) + " of "
|
||||
"type " + tgt->GetTargetTypeName(tgt->GetType()) + ".");
|
||||
"type " + cmState::GetTargetTypeName(tgt->GetType()) + ".");
|
||||
return -1;
|
||||
}
|
||||
if (tgt->IsImported())
|
||||
|
@ -44,7 +44,7 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
||||
std::string const& argv0 = this->CC.GetCommandLines()[c][0];
|
||||
cmGeneratorTarget* target =
|
||||
this->LG->FindGeneratorTargetToUse(argv0);
|
||||
if(target && target->GetType() == cmTarget::EXECUTABLE &&
|
||||
if(target && target->GetType() == cmState::EXECUTABLE &&
|
||||
(target->Target->IsImported()
|
||||
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
this->LG->GetMakefile()->GetBacktrace());
|
||||
return false;
|
||||
}
|
||||
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (te->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
this->GenerateRequiredCMakeVersion(os, "3.0.0");
|
||||
}
|
||||
@ -146,14 +146,14 @@ cmExportBuildFileGenerator
|
||||
cmGeneratorTarget* target = *tei;
|
||||
ImportPropertyMap properties;
|
||||
|
||||
if (target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
this->SetImportLocationProperty(config, suffix, target, properties);
|
||||
}
|
||||
if(!properties.empty())
|
||||
{
|
||||
// Get the rest of the target details.
|
||||
if (target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
this->SetImportDetailProperties(config, suffix,
|
||||
target,
|
||||
@ -216,7 +216,7 @@ cmExportBuildFileGenerator
|
||||
|
||||
// Add the import library for windows DLLs.
|
||||
if(dll_platform &&
|
||||
(target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
(target->GetType() == cmState::SHARED_LIBRARY ||
|
||||
target->Target->IsExecutableWithExports()) &&
|
||||
mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ bool cmExportCommand
|
||||
|
||||
if(cmTarget* target = gg->FindTarget(*currentTarget))
|
||||
{
|
||||
if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(target->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "given OBJECT library \"" << *currentTarget
|
||||
@ -176,7 +176,7 @@ bool cmExportCommand
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if (target->GetType() == cmTarget::UTILITY)
|
||||
if (target->GetType() == cmState::UTILITY)
|
||||
{
|
||||
this->SetError("given custom target \"" + *currentTarget
|
||||
+ "\" which may not be exported.");
|
||||
|
@ -597,7 +597,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
|
||||
getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MAX",
|
||||
ifaceProperties);
|
||||
|
||||
if (target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
getCompatibleInterfaceProperties(gtarget, ifaceProperties, "");
|
||||
|
||||
@ -885,8 +885,8 @@ cmExportFileGenerator
|
||||
cmMakefile* mf = target->Makefile;
|
||||
|
||||
// Add the soname for unix shared libraries.
|
||||
if(target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target->GetType() == cmState::SHARED_LIBRARY ||
|
||||
target->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
// Check whether this is a DLL platform.
|
||||
bool dll_platform =
|
||||
@ -1059,22 +1059,22 @@ cmExportFileGenerator
|
||||
os << "# Create imported target " << targetName << "\n";
|
||||
switch(target->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
os << "add_executable(" << targetName << " IMPORTED)\n";
|
||||
break;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
os << "add_library(" << targetName << " STATIC IMPORTED)\n";
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
os << "add_library(" << targetName << " SHARED IMPORTED)\n";
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
os << "add_library(" << targetName << " MODULE IMPORTED)\n";
|
||||
break;
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
os << "add_library(" << targetName << " UNKNOWN IMPORTED)\n";
|
||||
break;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
os << "add_library(" << targetName << " INTERFACE IMPORTED)\n";
|
||||
break;
|
||||
default: // should never happen
|
||||
|
@ -134,7 +134,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
cmTarget* te = (*tei)->Target;
|
||||
|
||||
requiresConfigFiles = requiresConfigFiles
|
||||
|| te->GetType() != cmTarget::INTERFACE_LIBRARY;
|
||||
|| te->GetType() != cmState::INTERFACE_LIBRARY;
|
||||
|
||||
this->GenerateImportTargetCode(os, te);
|
||||
|
||||
@ -180,7 +180,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
require2_8_12 = true;
|
||||
}
|
||||
}
|
||||
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (te->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
require3_0_0 = true;
|
||||
}
|
||||
@ -337,7 +337,7 @@ cmExportInstallFileGenerator
|
||||
{
|
||||
// Collect import properties for this target.
|
||||
cmTargetExport const* te = *tei;
|
||||
if (te->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (te->Target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
|
||||
cmTarget const& target = l->second;
|
||||
|
||||
// Skip non-library targets.
|
||||
if(target.GetType() < cmTarget::STATIC_LIBRARY
|
||||
|| target.GetType() > cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() < cmState::STATIC_LIBRARY
|
||||
|| target.GetType() > cmState::MODULE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -120,15 +120,15 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
|
||||
std::string ltValue;
|
||||
switch(li->second)
|
||||
{
|
||||
case cmTarget::GENERAL:
|
||||
case GENERAL_LibraryType:
|
||||
valueNew += "general;";
|
||||
ltValue = "general";
|
||||
break;
|
||||
case cmTarget::DEBUG:
|
||||
case DEBUG_LibraryType:
|
||||
valueNew += "debug;";
|
||||
ltValue = "debug";
|
||||
break;
|
||||
case cmTarget::OPTIMIZED:
|
||||
case OPTIMIZED_LibraryType:
|
||||
valueNew += "optimized;";
|
||||
ltValue = "optimized";
|
||||
break;
|
||||
|
@ -73,7 +73,7 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
|
||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
|
||||
|
||||
cmTarget dummyHead;
|
||||
dummyHead.SetType(cmTarget::EXECUTABLE, "try_compile_dummy_exe");
|
||||
dummyHead.SetType(cmState::EXECUTABLE, "try_compile_dummy_exe");
|
||||
dummyHead.SetMakefile(tgt->GetMakefile());
|
||||
|
||||
cmGeneratorTarget* gtgt =
|
||||
|
@ -326,7 +326,7 @@ void cmExtraCodeBlocksGenerator
|
||||
{
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
{
|
||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||
// not from the subdirs
|
||||
@ -338,7 +338,7 @@ void cmExtraCodeBlocksGenerator
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
// Add all utility targets, except the Nightly/Continuous/
|
||||
// Experimental-"sub"targets as e.g. NightlyStart
|
||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||
@ -352,11 +352,11 @@ void cmExtraCodeBlocksGenerator
|
||||
this->AppendTarget(fout, ti->first, 0,
|
||||
make.c_str(), *lg, compiler.c_str());
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
cmGeneratorTarget* gt =
|
||||
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
|
||||
@ -394,12 +394,12 @@ void cmExtraCodeBlocksGenerator
|
||||
{
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::UTILITY: // can have sources since 2.6.3
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::UTILITY: // can have sources since 2.6.3
|
||||
{
|
||||
std::vector<cmSourceFile*> sources;
|
||||
cmGeneratorTarget* gt =
|
||||
@ -563,7 +563,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||
{
|
||||
int cbTargetType = this->GetCBTargetType(target->Target);
|
||||
std::string workingDir = lg->GetCurrentBinaryDirectory();
|
||||
if ( target->GetType()==cmTarget::EXECUTABLE)
|
||||
if ( target->GetType()==cmState::EXECUTABLE)
|
||||
{
|
||||
// Determine the directory where the executable target is created, and
|
||||
// set the working directory to this dir.
|
||||
@ -586,7 +586,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||
|
||||
std::string buildType = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||
std::string location;
|
||||
if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
|
||||
if ( target->GetType()==cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
location = this->CreateDummyTargetFile(const_cast<cmLocalGenerator*>(lg),
|
||||
target);
|
||||
@ -721,7 +721,7 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||
// Translate the cmake target type into the CodeBlocks target type id
|
||||
int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
|
||||
{
|
||||
if ( target->GetType()==cmTarget::EXECUTABLE)
|
||||
if ( target->GetType()==cmState::EXECUTABLE)
|
||||
{
|
||||
if ((target->GetPropertyAsBool("WIN32_EXECUTABLE"))
|
||||
|| (target->GetPropertyAsBool("MACOSX_BUNDLE")))
|
||||
@ -733,13 +733,13 @@ int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (( target->GetType()==cmTarget::STATIC_LIBRARY)
|
||||
|| (target->GetType()==cmTarget::OBJECT_LIBRARY))
|
||||
else if (( target->GetType()==cmState::STATIC_LIBRARY)
|
||||
|| (target->GetType()==cmState::OBJECT_LIBRARY))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if ((target->GetType()==cmTarget::SHARED_LIBRARY)
|
||||
|| (target->GetType()==cmTarget::MODULE_LIBRARY))
|
||||
else if ((target->GetType()==cmState::SHARED_LIBRARY)
|
||||
|| (target->GetType()==cmState::MODULE_LIBRARY))
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
@ -162,22 +162,22 @@ void cmExtraCodeLiteGenerator
|
||||
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
{
|
||||
projectType = "Executable";
|
||||
}
|
||||
break;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
{
|
||||
projectType = "Static Library";
|
||||
}
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
{
|
||||
projectType = "Dynamic Library";
|
||||
}
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
projectType = "Dynamic Library";
|
||||
}
|
||||
@ -188,10 +188,10 @@ void cmExtraCodeLiteGenerator
|
||||
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
std::vector<cmSourceFile*> sources;
|
||||
cmGeneratorTarget* gt =
|
||||
|
@ -544,13 +544,13 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
|
||||
linkName2 += "/";
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ?
|
||||
const char* prefix = (ti->second.GetType()==cmState::EXECUTABLE ?
|
||||
"[exe] " : "[lib] ");
|
||||
linkName2 += prefix;
|
||||
linkName2 += ti->first;
|
||||
@ -1046,7 +1046,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
{
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
{
|
||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||
// not from the subdirs
|
||||
@ -1056,7 +1056,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
// Add all utility targets, except the Nightly/Continuous/
|
||||
// Experimental-"sub"targets as e.g. NightlyStart
|
||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||
@ -1069,13 +1069,13 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
|
||||
this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ?
|
||||
const char* prefix = (ti->second.GetType()==cmState::EXECUTABLE ?
|
||||
"[exe] " : "[lib] ");
|
||||
this->AppendTarget(fout, ti->first, make, makeArgs, subdir, prefix);
|
||||
std::string fastTarget = ti->first;
|
||||
|
@ -128,7 +128,7 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
|
||||
{
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
{
|
||||
bool insertTarget = false;
|
||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||
@ -159,7 +159,7 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
// Add all utility targets, except the Nightly/Continuous/
|
||||
// Experimental-"sub"targets as e.g. NightlyStart
|
||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||
@ -173,11 +173,11 @@ cmExtraKateGenerator::WriteTargets(const cmLocalGenerator* lg,
|
||||
this->AppendTarget(fout, ti->first, make, makeArgs,
|
||||
currentDir, homeOutputDir);
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
this->AppendTarget(fout, ti->first, make, makeArgs,
|
||||
currentDir, homeOutputDir);
|
||||
|
@ -168,7 +168,7 @@ void cmExtraSublimeTextGenerator::
|
||||
{
|
||||
switch(ti->second.GetType())
|
||||
{
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
{
|
||||
// Only add the global targets from CMAKE_BINARY_DIR,
|
||||
// not from the subdirs
|
||||
@ -181,7 +181,7 @@ void cmExtraSublimeTextGenerator::
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
// Add all utility targets, except the Nightly/Continuous/
|
||||
// Experimental-"sub"targets as e.g. NightlyStart
|
||||
if (((ti->first.find("Nightly")==0) &&(ti->first!="Nightly"))
|
||||
@ -196,11 +196,11 @@ void cmExtraSublimeTextGenerator::
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
sourceFileFlags, false);
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
this->AppendTarget(fout, ti->first, *lg, &ti->second,
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
|
@ -1144,7 +1144,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||
if (!prop)
|
||||
{
|
||||
if (target->IsImported()
|
||||
|| target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
|| target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return linkedTargetsContent;
|
||||
}
|
||||
@ -1284,7 +1284,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
|
||||
reportError(context, content->GetOriginalExpression(), e.str());
|
||||
return std::string();
|
||||
}
|
||||
if (gt->GetType() != cmTarget::OBJECT_LIBRARY)
|
||||
if (gt->GetType() != cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Objects of target \"" << tgtName
|
||||
@ -1592,7 +1592,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactSonameTag>
|
||||
"for DLL target platforms.");
|
||||
return std::string();
|
||||
}
|
||||
if(target->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
if(target->GetType() != cmState::SHARED_LIBRARY)
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"TARGET_SONAME_FILE is allowed only for "
|
||||
@ -1632,11 +1632,11 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
|
||||
return std::string();
|
||||
}
|
||||
|
||||
cmTarget::TargetType targetType = target->Target->GetType();
|
||||
cmState::TargetType targetType = target->GetType();
|
||||
|
||||
if(targetType != cmTarget::SHARED_LIBRARY &&
|
||||
targetType != cmTarget::MODULE_LIBRARY &&
|
||||
targetType != cmTarget::EXECUTABLE)
|
||||
if(targetType != cmState::SHARED_LIBRARY &&
|
||||
targetType != cmState::MODULE_LIBRARY &&
|
||||
targetType != cmState::EXECUTABLE)
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"TARGET_PDB_FILE is allowed only for "
|
||||
@ -1746,8 +1746,8 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
||||
"No target \"" + name + "\"");
|
||||
return std::string();
|
||||
}
|
||||
if(target->GetType() >= cmTarget::OBJECT_LIBRARY &&
|
||||
target->GetType() != cmTarget::UNKNOWN_LIBRARY)
|
||||
if(target->GetType() >= cmState::OBJECT_LIBRARY &&
|
||||
target->GetType() != cmState::UNKNOWN_LIBRARY)
|
||||
{
|
||||
::reportError(context, content->GetOriginalExpression(),
|
||||
"Target \"" + name + "\" is not an executable or library.");
|
||||
|
@ -155,7 +155,7 @@ struct TagVisitor
|
||||
: Data(data), Target(target),
|
||||
GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
|
||||
Header(CM_HEADER_REGEX),
|
||||
IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
IsObjLib(target->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ struct TagVisitor
|
||||
{
|
||||
DoAccept<IsSameTag<Tag, CustomCommandsTag>::Result>::Do(this->Data, sf);
|
||||
}
|
||||
else if(this->Target->GetType() == cmTarget::UTILITY)
|
||||
else if(this->Target->GetType() == cmState::UTILITY)
|
||||
{
|
||||
DoAccept<IsSameTag<Tag, ExtraSourcesTag>::Result>::Do(this->Data, sf);
|
||||
}
|
||||
@ -323,7 +323,7 @@ cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int cmGeneratorTarget::GetType() const
|
||||
cmState::TargetType cmGeneratorTarget::GetType() const
|
||||
{
|
||||
return this->Target->GetType();
|
||||
}
|
||||
@ -345,7 +345,7 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const
|
||||
{
|
||||
switch(this->GetType())
|
||||
{
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
if(this->Target->IsDLLPlatform())
|
||||
{
|
||||
if(implib)
|
||||
@ -365,10 +365,10 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const
|
||||
// library targets.
|
||||
return "LIBRARY";
|
||||
}
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
// Static libraries are always treated as archive targets.
|
||||
return "ARCHIVE";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if(implib)
|
||||
{
|
||||
// Module libraries are always treated as library targets.
|
||||
@ -379,7 +379,7 @@ const char* cmGeneratorTarget::GetOutputTargetType(bool implib) const
|
||||
// Module import libraries are treated as archive targets.
|
||||
return "LIBRARY";
|
||||
}
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
if(implib)
|
||||
{
|
||||
// Executable import libraries are treated as archive targets.
|
||||
@ -852,7 +852,7 @@ const char* cmGeneratorTarget::GetLocationForBuild() const
|
||||
bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
|
||||
const std::string& config) const
|
||||
{
|
||||
assert(this->GetType() != cmTarget::INTERFACE_LIBRARY);
|
||||
assert(this->GetType() != cmState::INTERFACE_LIBRARY);
|
||||
std::string config_upper;
|
||||
if(!config.empty())
|
||||
{
|
||||
@ -1042,7 +1042,7 @@ static bool processSources(cmGeneratorTarget const* tgt,
|
||||
void cmGeneratorTarget::GetSourceFiles(std::vector<std::string> &files,
|
||||
const std::string& config) const
|
||||
{
|
||||
assert(this->GetType() != cmTarget::INTERFACE_LIBRARY);
|
||||
assert(this->GetType() != cmState::INTERFACE_LIBRARY);
|
||||
|
||||
if (!this->Makefile->GetGlobalGenerator()->GetConfigureDoneCMP0026())
|
||||
{
|
||||
@ -1221,7 +1221,7 @@ bool cmGeneratorTarget::HasSOName(const std::string& config) const
|
||||
{
|
||||
// soname is supported only for shared libraries and modules,
|
||||
// and then only when the platform supports an soname flag.
|
||||
return ((this->GetType() == cmTarget::SHARED_LIBRARY) &&
|
||||
return ((this->GetType() == cmState::SHARED_LIBRARY) &&
|
||||
!this->GetPropertyAsBool("NO_SONAME") &&
|
||||
this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config)));
|
||||
}
|
||||
@ -1232,9 +1232,9 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const
|
||||
{
|
||||
// Only executables and shared libraries can have an rpath and may
|
||||
// need relinking.
|
||||
if(this->GetType() != cmTarget::EXECUTABLE &&
|
||||
this->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
this->GetType() != cmTarget::MODULE_LIBRARY)
|
||||
if(this->GetType() != cmState::EXECUTABLE &&
|
||||
this->GetType() != cmState::SHARED_LIBRARY &&
|
||||
this->GetType() != cmState::MODULE_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -1296,9 +1296,9 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const
|
||||
bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const
|
||||
{
|
||||
// Only certain target types have an rpath.
|
||||
if(!(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->GetType() == cmTarget::EXECUTABLE))
|
||||
if(!(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->GetType() == cmState::EXECUTABLE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -1363,7 +1363,7 @@ bool cmGeneratorTarget::IsChrpathUsed(const std::string& config) const
|
||||
bool cmGeneratorTarget::IsImportedSharedLibWithoutSOName(
|
||||
const std::string& config) const
|
||||
{
|
||||
if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(this->IsImported() && this->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
if(cmTarget::ImportInfo const* info = this->Target->GetImportInfo(config))
|
||||
{
|
||||
@ -1382,7 +1382,7 @@ bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir(
|
||||
|
||||
if(!this->IsImported())
|
||||
{
|
||||
if(this->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
if(this->GetType() != cmState::SHARED_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -1960,12 +1960,12 @@ cmGeneratorTarget::CompileInfo const* cmGeneratorTarget::GetCompileInfo(
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(this->GetType() > cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GetType() > cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::string msg = "cmTarget::GetCompileInfo called for ";
|
||||
msg += this->GetName();
|
||||
msg += " which has type ";
|
||||
msg += cmTarget::GetTargetTypeName(this->Target->GetType());
|
||||
msg += cmState::GetTargetTypeName(this->GetType());
|
||||
this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg);
|
||||
return 0;
|
||||
}
|
||||
@ -2155,7 +2155,7 @@ cmTargetTraceDependencies
|
||||
this->CurrentEntry = 0;
|
||||
|
||||
// Queue all the source files already specified for the target.
|
||||
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::vector<std::string> configs;
|
||||
this->Makefile->GetConfigurations(configs);
|
||||
@ -2313,8 +2313,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
|
||||
// the fact that the name matched a target was just a coincidence.
|
||||
if(cmSystemTools::FileIsFullPath(dep.c_str()))
|
||||
{
|
||||
if(t->GetType() >= cmTarget::EXECUTABLE &&
|
||||
t->GetType() <= cmTarget::MODULE_LIBRARY)
|
||||
if(t->GetType() >= cmState::EXECUTABLE &&
|
||||
t->GetType() <= cmState::MODULE_LIBRARY)
|
||||
{
|
||||
// This is really only for compatibility so we do not need to
|
||||
// worry about configuration names and output names.
|
||||
@ -2362,7 +2362,7 @@ cmTargetTraceDependencies
|
||||
// Check for a target with this name.
|
||||
if(cmTarget* t = this->Makefile->FindTargetToUse(command))
|
||||
{
|
||||
if(t->GetType() == cmTarget::EXECUTABLE)
|
||||
if(t->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
// The command refers to an executable target built in
|
||||
// this project. Add the target-level dependency to make
|
||||
@ -2450,7 +2450,7 @@ void cmGeneratorTarget::TraceDependencies()
|
||||
// would find nothing anyway, but when building CMake itself the "install"
|
||||
// target command ends up referencing the "cmake" target but we do not
|
||||
// really want the dependency because "install" depend on "all" anyway.
|
||||
if(this->GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if(this->GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2498,7 +2498,7 @@ cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang,
|
||||
{
|
||||
switch(this->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
{
|
||||
std::string var = "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY";
|
||||
if(this->GetFeatureAsBool(
|
||||
@ -2512,11 +2512,11 @@ cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang,
|
||||
}
|
||||
return var;
|
||||
}
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return "CMAKE_" + lang + "_CREATE_SHARED_MODULE";
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return "CMAKE_" + lang + "_LINK_EXECUTABLE";
|
||||
default:
|
||||
break;
|
||||
@ -3041,13 +3041,13 @@ void cmGeneratorTarget::ComputeTargetManifest(
|
||||
std::string realName;
|
||||
std::string impName;
|
||||
std::string pdbName;
|
||||
if(this->GetType() == cmTarget::EXECUTABLE)
|
||||
if(this->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
this->GetExecutableNames(name, realName, impName, pdbName, config);
|
||||
}
|
||||
else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
else if(this->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
this->GetLibraryNames(name, soName, realName, impName, pdbName,
|
||||
config);
|
||||
@ -3155,7 +3155,7 @@ cmGeneratorTarget::NormalGetRealName(const std::string& config) const
|
||||
this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg);
|
||||
}
|
||||
|
||||
if(this->GetType() == cmTarget::EXECUTABLE)
|
||||
if(this->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
// Compute the real name that will be built.
|
||||
std::string name;
|
||||
@ -3255,8 +3255,8 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
|
||||
}
|
||||
|
||||
// The import library name.
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
impName = this->GetFullNameInternal(config, true);
|
||||
}
|
||||
@ -3294,7 +3294,7 @@ void cmGeneratorTarget::GetExecutableNames(std::string& name,
|
||||
#else
|
||||
// Check for executable version properties.
|
||||
const char* version = this->GetProperty("VERSION");
|
||||
if(this->GetType() != cmTarget::EXECUTABLE || this->Makefile->IsOn("XCODE"))
|
||||
if(this->GetType() != cmState::EXECUTABLE || this->Makefile->IsOn("XCODE"))
|
||||
{
|
||||
version = 0;
|
||||
}
|
||||
@ -3350,10 +3350,10 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
|
||||
std::string& outSuffix) const
|
||||
{
|
||||
// Use just the target name for non-main target types.
|
||||
if(this->GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
this->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
this->GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
this->GetType() != cmTarget::EXECUTABLE)
|
||||
if(this->GetType() != cmState::STATIC_LIBRARY &&
|
||||
this->GetType() != cmState::SHARED_LIBRARY &&
|
||||
this->GetType() != cmState::MODULE_LIBRARY &&
|
||||
this->GetType() != cmState::EXECUTABLE)
|
||||
{
|
||||
outPrefix = "";
|
||||
outBase = this->GetName();
|
||||
@ -3374,9 +3374,9 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
|
||||
|
||||
// The implib option is only allowed for shared libraries, module
|
||||
// libraries, and executables.
|
||||
if(this->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
this->GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
this->GetType() != cmTarget::EXECUTABLE)
|
||||
if(this->GetType() != cmState::SHARED_LIBRARY &&
|
||||
this->GetType() != cmState::MODULE_LIBRARY &&
|
||||
this->GetType() != cmState::EXECUTABLE)
|
||||
{
|
||||
implib = false;
|
||||
}
|
||||
@ -3462,7 +3462,7 @@ void cmGeneratorTarget::GetFullNameInternal(const std::string& config,
|
||||
// Name shared libraries with their version number on some platforms.
|
||||
if(const char* soversion = this->GetProperty("SOVERSION"))
|
||||
{
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY && !implib &&
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY && !implib &&
|
||||
this->Makefile->IsOn("CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION"))
|
||||
{
|
||||
outBase += "-";
|
||||
@ -3657,8 +3657,8 @@ cmGeneratorTarget::GetCompatibleInterfaces(std::string const& config) const
|
||||
bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty(
|
||||
const std::string &p, const std::string& config) const
|
||||
{
|
||||
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY
|
||||
|| this->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GetType() == cmState::OBJECT_LIBRARY
|
||||
|| this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -3669,8 +3669,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentBoolProperty(
|
||||
bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty(
|
||||
const std::string &p, const std::string& config) const
|
||||
{
|
||||
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY
|
||||
|| this->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GetType() == cmState::OBJECT_LIBRARY
|
||||
|| this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -3681,8 +3681,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentStringProperty(
|
||||
bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty(
|
||||
const std::string &p, const std::string& config) const
|
||||
{
|
||||
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY
|
||||
|| this->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GetType() == cmState::OBJECT_LIBRARY
|
||||
|| this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -3693,8 +3693,8 @@ bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMinProperty(
|
||||
bool cmGeneratorTarget::IsLinkInterfaceDependentNumberMaxProperty(
|
||||
const std::string &p, const std::string& config) const
|
||||
{
|
||||
if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY
|
||||
|| this->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GetType() == cmState::OBJECT_LIBRARY
|
||||
|| this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -4474,7 +4474,7 @@ cmGeneratorTarget::GetLinkInterface(const std::string& config,
|
||||
|
||||
// Link interfaces are not supported for executables that do not
|
||||
// export symbols.
|
||||
if(this->GetType() == cmTarget::EXECUTABLE &&
|
||||
if(this->GetType() == cmState::EXECUTABLE &&
|
||||
!this->Target->IsExecutableWithExports())
|
||||
{
|
||||
return 0;
|
||||
@ -4517,9 +4517,9 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
|
||||
{
|
||||
if(iface.ExplicitLibraries)
|
||||
{
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY
|
||||
|| this->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|| this->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY
|
||||
|| this->GetType() == cmState::STATIC_LIBRARY
|
||||
|| this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
// Shared libraries may have runtime implementation dependencies
|
||||
// on other shared libraries that are not in the interface.
|
||||
@ -4529,7 +4529,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
|
||||
{
|
||||
emitted.insert(*li);
|
||||
}
|
||||
if (this->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
cmLinkImplementation const* impl =
|
||||
this->GetLinkImplementation(config);
|
||||
@ -4541,7 +4541,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
|
||||
if(li->Target)
|
||||
{
|
||||
// This is a runtime dependency on another shared library.
|
||||
if(li->Target->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(li->Target->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
iface.SharedDeps.push_back(*li);
|
||||
}
|
||||
@ -4579,7 +4579,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
|
||||
}
|
||||
}
|
||||
|
||||
if(this->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(this->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
// Construct the property name suffix for this configuration.
|
||||
std::string suffix = "_";
|
||||
@ -4623,7 +4623,7 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config,
|
||||
|
||||
// Link interfaces are not supported for executables that do not
|
||||
// export symbols.
|
||||
if(this->GetType() == cmTarget::EXECUTABLE &&
|
||||
if(this->GetType() == cmState::EXECUTABLE &&
|
||||
!this->Target->IsExecutableWithExports())
|
||||
{
|
||||
return 0;
|
||||
@ -4697,7 +4697,7 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo(
|
||||
std::string msg = "cmGeneratorTarget::GetOutputInfo called for ";
|
||||
msg += this->GetName();
|
||||
msg += " which has type ";
|
||||
msg += cmTarget::GetTargetTypeName(cmTarget::TargetType(this->GetType()));
|
||||
msg += cmState::GetTargetTypeName(this->GetType());
|
||||
this->LocalGenerator->IssueMessage(cmake::INTERNAL_ERROR, msg);
|
||||
return 0;
|
||||
}
|
||||
@ -4797,14 +4797,14 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
|
||||
conf = "";
|
||||
}
|
||||
}
|
||||
else if(this->GetType() == cmTarget::EXECUTABLE)
|
||||
else if(this->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
// Lookup the output path for executables.
|
||||
out = this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
|
||||
}
|
||||
else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
else if(this->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
// Lookup the output path for libraries.
|
||||
out = this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
|
||||
@ -4934,7 +4934,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
|
||||
linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
|
||||
explicitLibraries = this->GetProperty(linkIfaceProp);
|
||||
}
|
||||
else if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
else if(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->Target->IsExecutableWithExports())
|
||||
{
|
||||
// CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a
|
||||
@ -4982,8 +4982,8 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
|
||||
// There is no implicit link interface for executables or modules
|
||||
// so if none was explicitly set then there is no link interface.
|
||||
if(!explicitLibraries &&
|
||||
(this->GetType() == cmTarget::EXECUTABLE ||
|
||||
(this->GetType() == cmTarget::MODULE_LIBRARY)))
|
||||
(this->GetType() == cmState::EXECUTABLE ||
|
||||
(this->GetType() == cmState::MODULE_LIBRARY)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -5416,13 +5416,13 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
|
||||
this->MaxLanguageStandards);
|
||||
}
|
||||
|
||||
cmTarget::LinkLibraryType linkType = this->Target->ComputeLinkType(config);
|
||||
cmTargetLinkLibraryType linkType = this->Target->ComputeLinkType(config);
|
||||
cmTarget::LinkLibraryVectorType const& oldllibs =
|
||||
this->Target->GetOriginalLinkLibraries();
|
||||
for(cmTarget::LinkLibraryVectorType::const_iterator li = oldllibs.begin();
|
||||
li != oldllibs.end(); ++li)
|
||||
{
|
||||
if(li->second != cmTarget::GENERAL && li->second != linkType)
|
||||
if(li->second != GENERAL_LibraryType && li->second != linkType)
|
||||
{
|
||||
std::string name = this->Target->CheckCMP0004(li->first);
|
||||
if(name == this->GetName() || name.empty())
|
||||
@ -5445,13 +5445,13 @@ cmGeneratorTarget::FindTargetToLink(std::string const& name) const
|
||||
// Skip targets that will not really be linked. This is probably a
|
||||
// name conflict between an external library and an executable
|
||||
// within the project.
|
||||
if(tgt && tgt->GetType() == cmTarget::EXECUTABLE &&
|
||||
if(tgt && tgt->GetType() == cmState::EXECUTABLE &&
|
||||
!tgt->IsExecutableWithExports())
|
||||
{
|
||||
tgt = 0;
|
||||
}
|
||||
|
||||
if(tgt && tgt->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(tgt && tgt->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Target \"" << this->GetName() << "\" links to "
|
||||
@ -5509,7 +5509,7 @@ bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName,
|
||||
bool cmGeneratorTarget::HasImportLibrary() const
|
||||
{
|
||||
return (this->Target->IsDLLPlatform() &&
|
||||
(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->Target->IsExecutableWithExports()));
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
cmComputeLinkInformation*
|
||||
GetLinkInformation(const std::string& config) const;
|
||||
|
||||
int GetType() const;
|
||||
cmState::TargetType GetType() const;
|
||||
std::string GetName() const;
|
||||
const char *GetProperty(const std::string& prop) const;
|
||||
bool GetPropertyAsBool(const std::string& prop) const;
|
||||
|
@ -148,7 +148,7 @@ void cmGhsMultiTargetGenerator::Generate()
|
||||
this->WriteCompilerFlags(config, language);
|
||||
this->WriteCompilerDefinitions(config, language);
|
||||
this->WriteIncludes(config, language);
|
||||
if (this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
this->WriteTargetLinkLibraries();
|
||||
}
|
||||
@ -191,7 +191,7 @@ GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag(
|
||||
{
|
||||
output = GhsMultiGpj::INTERGRITY_APPLICATION;
|
||||
}
|
||||
else if (target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
else if (target->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
output = GhsMultiGpj::LIBRARY;
|
||||
}
|
||||
@ -215,13 +215,13 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
|
||||
std::string outputDir(this->GetOutputDirectory(config));
|
||||
std::string outputFilename(this->GetOutputFilename(config));
|
||||
|
||||
if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
*this->GetFolderBuildStreams() << " {optgroup=GhsCommonOptions} -o \""
|
||||
<< outputDir << outputFilename << ".a\""
|
||||
<< std::endl;
|
||||
}
|
||||
else if (this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
if (notKernel && !this->IsTargetGroup())
|
||||
{
|
||||
|
@ -1444,15 +1444,15 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
|
||||
for(cmTargets::iterator ti = targets.begin();
|
||||
ti != targets.end(); ++ti)
|
||||
{
|
||||
if (ti->second.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (ti->second.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(ti->second.GetType() != cmTarget::EXECUTABLE &&
|
||||
ti->second.GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
ti->second.GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
ti->second.GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
ti->second.GetType() != cmTarget::OBJECT_LIBRARY)
|
||||
if(ti->second.GetType() != cmState::EXECUTABLE &&
|
||||
ti->second.GetType() != cmState::STATIC_LIBRARY &&
|
||||
ti->second.GetType() != cmState::SHARED_LIBRARY &&
|
||||
ti->second.GetType() != cmState::MODULE_LIBRARY &&
|
||||
ti->second.GetType() != cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1510,14 +1510,14 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
|
||||
ti != targets.end(); ++ti)
|
||||
{
|
||||
cmTarget* t = &ti->second;
|
||||
if (t->GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (t->GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
t->AppendBuildInterfaceIncludes();
|
||||
|
||||
if (t->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (t->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1650,7 +1650,7 @@ void cmGlobalGenerator::CheckTargetProperties()
|
||||
for (cmTargets::iterator l = targets.begin();
|
||||
l != targets.end(); l++)
|
||||
{
|
||||
if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -2058,7 +2058,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||
cmGeneratorTarget* target) const
|
||||
{
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| target->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
||||
{
|
||||
// This target is excluded from its directory.
|
||||
@ -2519,7 +2519,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
|
||||
{
|
||||
// Package
|
||||
cmTarget target;
|
||||
target.SetType(cmTarget::GLOBAL_TARGET, name);
|
||||
target.SetType(cmState::GLOBAL_TARGET, name);
|
||||
target.SetProperty("EXCLUDE_FROM_ALL","TRUE");
|
||||
|
||||
std::vector<std::string> no_outputs;
|
||||
@ -2701,7 +2701,7 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target) const
|
||||
{
|
||||
return (target->GetType() == cmTarget::GLOBAL_TARGET ||
|
||||
return (target->GetType() == cmState::GLOBAL_TARGET ||
|
||||
target->GetName() == this->GetAllTargetName());
|
||||
}
|
||||
|
||||
@ -2915,7 +2915,7 @@ void cmGlobalGenerator::WriteSummary()
|
||||
for(TargetMap::const_iterator ti =
|
||||
this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti)
|
||||
{
|
||||
if ((ti->second)->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if ((ti->second)->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void cmGlobalKdevelopGenerator::Generate()
|
||||
for (cmGeneratorTargetsType::const_iterator ti = targets.begin();
|
||||
ti != targets.end(); ti++)
|
||||
{
|
||||
if (ti->second->GetType()==cmTarget::EXECUTABLE)
|
||||
if (ti->second->GetType()==cmState::EXECUTABLE)
|
||||
{
|
||||
executable = ti->second->GetLocation("");
|
||||
break;
|
||||
|
@ -924,18 +924,18 @@ cmGlobalNinjaGenerator
|
||||
bool realname = target->IsFrameworkOnApple();
|
||||
|
||||
switch (target->GetType()) {
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
cmGeneratorTarget *gtgt = this->GetGeneratorTarget(target);
|
||||
outputs.push_back(this->ConvertToNinjaPath(
|
||||
gtgt->GetFullPath(configName, false, realname)));
|
||||
break;
|
||||
}
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::UTILITY: {
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::UTILITY: {
|
||||
std::string path = this->ConvertToNinjaPath(
|
||||
target->GetMakefile()->GetCurrentBinaryDirectory());
|
||||
if (path.empty() || path == ".")
|
||||
@ -948,7 +948,7 @@ cmGlobalNinjaGenerator
|
||||
break;
|
||||
}
|
||||
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
// Always use the target in HOME instead of an unused duplicate in a
|
||||
// subdirectory.
|
||||
outputs.push_back(target->GetName());
|
||||
@ -963,7 +963,7 @@ void
|
||||
cmGlobalNinjaGenerator
|
||||
::AppendTargetDepends(cmTarget const* target, cmNinjaDeps& outputs)
|
||||
{
|
||||
if (target->GetType() == cmTarget::GLOBAL_TARGET) {
|
||||
if (target->GetType() == cmState::GLOBAL_TARGET) {
|
||||
// Global targets only depend on other utilities, which may not appear in
|
||||
// the TargetDepends set (e.g. "all").
|
||||
std::set<std::string> const& utils = target->GetUtilities();
|
||||
@ -974,7 +974,7 @@ cmGlobalNinjaGenerator
|
||||
for (cmTargetDependSet::const_iterator i = targetDeps.begin();
|
||||
i != targetDeps.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if ((*i)->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -426,12 +426,12 @@ void cmGlobalUnixMakefileGenerator3
|
||||
for (cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin();
|
||||
l != lg->GetMakefile()->GetTargets().end(); l++)
|
||||
{
|
||||
if((l->second.GetType() == cmTarget::EXECUTABLE) ||
|
||||
(l->second.GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||
(l->second.GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||
(l->second.GetType() == cmTarget::MODULE_LIBRARY) ||
|
||||
(l->second.GetType() == cmTarget::OBJECT_LIBRARY) ||
|
||||
(l->second.GetType() == cmTarget::UTILITY))
|
||||
if((l->second.GetType() == cmState::EXECUTABLE) ||
|
||||
(l->second.GetType() == cmState::STATIC_LIBRARY) ||
|
||||
(l->second.GetType() == cmState::SHARED_LIBRARY) ||
|
||||
(l->second.GetType() == cmState::MODULE_LIBRARY) ||
|
||||
(l->second.GetType() == cmState::OBJECT_LIBRARY) ||
|
||||
(l->second.GetType() == cmState::UTILITY))
|
||||
{
|
||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(&l->second);
|
||||
std::string tname = lg->GetRelativeTargetDirectory(gt);
|
||||
@ -466,12 +466,12 @@ cmGlobalUnixMakefileGenerator3
|
||||
{
|
||||
cmGeneratorTarget* gtarget = l->second;
|
||||
int type = gtarget->GetType();
|
||||
if((type == cmTarget::EXECUTABLE) ||
|
||||
(type == cmTarget::STATIC_LIBRARY) ||
|
||||
(type == cmTarget::SHARED_LIBRARY) ||
|
||||
(type == cmTarget::MODULE_LIBRARY) ||
|
||||
(type == cmTarget::OBJECT_LIBRARY) ||
|
||||
(type == cmTarget::UTILITY))
|
||||
if((type == cmState::EXECUTABLE) ||
|
||||
(type == cmState::STATIC_LIBRARY) ||
|
||||
(type == cmState::SHARED_LIBRARY) ||
|
||||
(type == cmState::MODULE_LIBRARY) ||
|
||||
(type == cmState::OBJECT_LIBRARY) ||
|
||||
(type == cmState::UTILITY))
|
||||
{
|
||||
if(gtarget->Target->IsImported())
|
||||
{
|
||||
@ -644,12 +644,12 @@ cmGlobalUnixMakefileGenerator3
|
||||
emitted.insert(name).second &&
|
||||
// Handle user targets here. Global targets are handled in
|
||||
// the local generator on a per-directory basis.
|
||||
((type == cmTarget::EXECUTABLE) ||
|
||||
(type == cmTarget::STATIC_LIBRARY) ||
|
||||
(type == cmTarget::SHARED_LIBRARY) ||
|
||||
(type == cmTarget::MODULE_LIBRARY) ||
|
||||
(type == cmTarget::OBJECT_LIBRARY) ||
|
||||
(type == cmTarget::UTILITY)))
|
||||
((type == cmState::EXECUTABLE) ||
|
||||
(type == cmState::STATIC_LIBRARY) ||
|
||||
(type == cmState::SHARED_LIBRARY) ||
|
||||
(type == cmState::MODULE_LIBRARY) ||
|
||||
(type == cmState::OBJECT_LIBRARY) ||
|
||||
(type == cmState::UTILITY)))
|
||||
{
|
||||
// Add a rule to build the target by name.
|
||||
lg->WriteDivider(ruleFileStream);
|
||||
@ -740,12 +740,12 @@ cmGlobalUnixMakefileGenerator3
|
||||
int type = gtarget->GetType();
|
||||
std::string name = gtarget->GetName();
|
||||
if (!name.empty()
|
||||
&& ( (type == cmTarget::EXECUTABLE)
|
||||
|| (type == cmTarget::STATIC_LIBRARY)
|
||||
|| (type == cmTarget::SHARED_LIBRARY)
|
||||
|| (type == cmTarget::MODULE_LIBRARY)
|
||||
|| (type == cmTarget::OBJECT_LIBRARY)
|
||||
|| (type == cmTarget::UTILITY)))
|
||||
&& ( (type == cmState::EXECUTABLE)
|
||||
|| (type == cmState::STATIC_LIBRARY)
|
||||
|| (type == cmState::SHARED_LIBRARY)
|
||||
|| (type == cmState::MODULE_LIBRARY)
|
||||
|| (type == cmState::OBJECT_LIBRARY)
|
||||
|| (type == cmState::UTILITY)))
|
||||
{
|
||||
std::string makefileName;
|
||||
// Add a rule to build the target by name.
|
||||
@ -936,7 +936,7 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
|
||||
|
||||
cmLocalGenerator* tlg = gt->GetLocalGenerator();
|
||||
|
||||
if(gt->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if(gt->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| gt->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
||||
{
|
||||
continue;
|
||||
@ -983,7 +983,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
for(TargetDependSet::const_iterator di = depends.begin();
|
||||
di != depends.end(); ++di)
|
||||
{
|
||||
if ((*di)->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if ((*di)->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1059,7 +1059,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
{
|
||||
// Create the target-level dependency.
|
||||
cmGeneratorTarget const* dep = *i;
|
||||
if (dep->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (dep->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1105,14 +1105,14 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
|
||||
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
|
||||
{
|
||||
cmTarget const& target = t->second;
|
||||
cmTarget::TargetType type = target.GetType();
|
||||
if((type == cmTarget::EXECUTABLE) ||
|
||||
(type == cmTarget::STATIC_LIBRARY) ||
|
||||
(type == cmTarget::SHARED_LIBRARY) ||
|
||||
(type == cmTarget::MODULE_LIBRARY) ||
|
||||
(type == cmTarget::OBJECT_LIBRARY) ||
|
||||
(type == cmTarget::GLOBAL_TARGET) ||
|
||||
(type == cmTarget::UTILITY))
|
||||
cmState::TargetType type = target.GetType();
|
||||
if((type == cmState::EXECUTABLE) ||
|
||||
(type == cmState::STATIC_LIBRARY) ||
|
||||
(type == cmState::SHARED_LIBRARY) ||
|
||||
(type == cmState::MODULE_LIBRARY) ||
|
||||
(type == cmState::OBJECT_LIBRARY) ||
|
||||
(type == cmState::GLOBAL_TARGET) ||
|
||||
(type == cmState::UTILITY))
|
||||
{
|
||||
std::string name = target.GetName();
|
||||
if(emittedTargets.insert(name).second)
|
||||
|
@ -278,10 +278,10 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs()
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmGlobalVisualStudio11Generator::NeedsDeploy(cmTarget::TargetType type) const
|
||||
cmGlobalVisualStudio11Generator::NeedsDeploy(cmState::TargetType type) const
|
||||
{
|
||||
if((type == cmTarget::EXECUTABLE ||
|
||||
type == cmTarget::SHARED_LIBRARY) &&
|
||||
if((type == cmState::EXECUTABLE ||
|
||||
type == cmState::SHARED_LIBRARY) &&
|
||||
(this->SystemIsWindowsPhone ||
|
||||
this->SystemIsWindowsStore))
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ protected:
|
||||
static std::set<std::string> GetInstalledWindowsCESDKs();
|
||||
|
||||
/** Return true if the configuration needs to be deployed */
|
||||
virtual bool NeedsDeploy(cmTarget::TargetType type) const;
|
||||
virtual bool NeedsDeploy(cmState::TargetType type) const;
|
||||
private:
|
||||
class Factory;
|
||||
friend class Factory;
|
||||
|
@ -224,7 +224,7 @@ void cmGlobalVisualStudio6Generator
|
||||
tt != orderedProjectTargets.end(); ++tt)
|
||||
{
|
||||
cmTarget const* target = (*tt)->Target;
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ void cmGlobalVisualStudio71Generator
|
||||
// executables to the libraries it uses are also done here
|
||||
void cmGlobalVisualStudio71Generator
|
||||
::WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
std::string const& platformMapping)
|
||||
|
@ -64,7 +64,7 @@ protected:
|
||||
const std::string& name, const char* path,
|
||||
cmTarget const& t);
|
||||
virtual void WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType type,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType type,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
const std::string& platformMapping = "");
|
||||
|
@ -402,7 +402,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
|
||||
projectTargets.begin(); tt != projectTargets.end(); ++tt)
|
||||
{
|
||||
cmTarget const* target = (*tt)->Target;
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -442,7 +442,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
||||
projectTargets.begin(); tt != projectTargets.end(); ++tt)
|
||||
{
|
||||
cmTarget const* target = (*tt)->Target;
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -536,7 +536,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends(
|
||||
projectTargets.begin(); tt != projectTargets.end(); ++tt)
|
||||
{
|
||||
cmTarget const* target = (*tt)->Target;
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -762,7 +762,7 @@ cmGlobalVisualStudio7Generator
|
||||
// executables to the libraries it uses are also done here
|
||||
void cmGlobalVisualStudio7Generator
|
||||
::WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
const std::string& platformMapping)
|
||||
@ -1002,7 +1002,7 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
|
||||
// if it is a utilitiy target then only make it part of the
|
||||
// default build if another target depends on it
|
||||
int type = target->GetType();
|
||||
if (type == cmTarget::GLOBAL_TARGET)
|
||||
if (type == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
// check if INSTALL target is part of default build
|
||||
if(target->GetName() == "INSTALL")
|
||||
@ -1025,7 +1025,7 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
|
||||
}
|
||||
return activeConfigs;
|
||||
}
|
||||
if(type == cmTarget::UTILITY && !this->IsDependedOn(projectTargets, target))
|
||||
if(type == cmState::UTILITY && !this->IsDependedOn(projectTargets, target))
|
||||
{
|
||||
return activeConfigs;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ protected:
|
||||
const std::string& name, const char* path,
|
||||
cmTarget const&t);
|
||||
virtual void WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType type,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType type,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
const std::string& platformMapping = "");
|
||||
|
@ -386,7 +386,7 @@ cmGlobalVisualStudio8Generator
|
||||
void
|
||||
cmGlobalVisualStudio8Generator
|
||||
::WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType type,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType type,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
std::string const& platformMapping)
|
||||
@ -423,10 +423,10 @@ cmGlobalVisualStudio8Generator
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmGlobalVisualStudio8Generator::NeedsDeploy(cmTarget::TargetType type) const
|
||||
cmGlobalVisualStudio8Generator::NeedsDeploy(cmState::TargetType type) const
|
||||
{
|
||||
bool needsDeploy = (type == cmTarget::EXECUTABLE ||
|
||||
type == cmTarget::SHARED_LIBRARY);
|
||||
bool needsDeploy = (type == cmState::EXECUTABLE ||
|
||||
type == cmState::SHARED_LIBRARY);
|
||||
return this->TargetsWindowsCE() && needsDeploy;
|
||||
}
|
||||
|
||||
@ -448,7 +448,7 @@ void cmGlobalVisualStudio8Generator::WriteProjectDepends(
|
||||
for(OrderedTargetDependSet::const_iterator i = depends.begin();
|
||||
i != depends.end(); ++i)
|
||||
{
|
||||
if((*i)->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if((*i)->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -468,7 +468,7 @@ bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies(
|
||||
{
|
||||
if(cmTarget* depTarget = this->FindTarget(ui->c_str()))
|
||||
{
|
||||
if(depTarget->GetType() != cmTarget::INTERFACE_LIBRARY
|
||||
if(depTarget->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& depTarget->GetProperty("EXTERNAL_MSPROJECT"))
|
||||
{
|
||||
// This utility dependency names an external .vcproj target.
|
||||
|
@ -77,14 +77,14 @@ protected:
|
||||
bool AddCheckTarget();
|
||||
|
||||
/** Return true if the configuration needs to be deployed */
|
||||
virtual bool NeedsDeploy(cmTarget::TargetType type) const;
|
||||
virtual bool NeedsDeploy(cmState::TargetType type) const;
|
||||
|
||||
static cmIDEFlagTable const* GetExtraFlagTableVS8();
|
||||
virtual void WriteSLNHeader(std::ostream& fout);
|
||||
virtual void WriteSolutionConfigurations(
|
||||
std::ostream& fout, std::vector<std::string> const& configs);
|
||||
virtual void WriteProjectConfigurations(
|
||||
std::ostream& fout, const std::string& name, cmTarget::TargetType type,
|
||||
std::ostream& fout, const std::string& name, cmState::TargetType type,
|
||||
std::vector<std::string> const& configs,
|
||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||
const std::string& platformMapping = "");
|
||||
|
@ -112,7 +112,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
|
||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->GetType() == cmTarget::GLOBAL_TARGET
|
||||
if (t->second->GetType() == cmState::GLOBAL_TARGET
|
||||
|| t->first->IsImported())
|
||||
{
|
||||
continue;
|
||||
@ -337,12 +337,12 @@ cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmTarget* target)
|
||||
void cmGlobalVisualStudioGenerator::FollowLinkDepends(
|
||||
cmTarget const* target, std::set<cmTarget const*>& linked)
|
||||
{
|
||||
if(target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(linked.insert(target).second &&
|
||||
target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
target->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
// Static library targets do not list their link dependencies so
|
||||
// we must follow them transitively now.
|
||||
@ -387,7 +387,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends()
|
||||
//----------------------------------------------------------------------------
|
||||
static bool VSLinkable(cmTarget const* t)
|
||||
{
|
||||
return t->IsLinkable() || t->GetType() == cmTarget::OBJECT_LIBRARY;
|
||||
return t->IsLinkable() || t->GetType() == cmState::OBJECT_LIBRARY;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -417,10 +417,10 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
||||
// leaving them out for the static library itself but following them
|
||||
// transitively for other targets.
|
||||
|
||||
bool allowLinkable = (target.GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
target.GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
target.GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
target.GetType() != cmTarget::EXECUTABLE);
|
||||
bool allowLinkable = (target.GetType() != cmState::STATIC_LIBRARY &&
|
||||
target.GetType() != cmState::SHARED_LIBRARY &&
|
||||
target.GetType() != cmState::MODULE_LIBRARY &&
|
||||
target.GetType() != cmState::EXECUTABLE);
|
||||
|
||||
cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
|
||||
TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
|
||||
@ -429,7 +429,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
||||
// Static libraries cannot depend on their link implementation
|
||||
// due to behavior (2), but they do not really need to.
|
||||
std::set<cmTarget const*> linkDepends;
|
||||
if(target.GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(target.GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
for(TargetDependSet::const_iterator di = depends.begin();
|
||||
di != depends.end(); ++di)
|
||||
@ -457,7 +457,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
||||
// Collect all targets linked by this target so we can avoid
|
||||
// intermediate targets below.
|
||||
TargetSet linked;
|
||||
if(target.GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(target.GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
linked = this->GetTargetLinkClosure(&target);
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||
{
|
||||
cmTarget& target = l->second;
|
||||
|
||||
if (target.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (target.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -528,12 +528,12 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||
// this will make sure that when the next target is built
|
||||
// things are up-to-date
|
||||
if(!makeHelper.empty() &&
|
||||
(target.GetType() == cmTarget::EXECUTABLE ||
|
||||
(target.GetType() == cmState::EXECUTABLE ||
|
||||
// Nope - no post-build for OBJECT_LIRBRARY
|
||||
// target.GetType() == cmTarget::OBJECT_LIBRARY ||
|
||||
target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY))
|
||||
// target.GetType() == cmState::OBJECT_LIBRARY ||
|
||||
target.GetType() == cmState::STATIC_LIBRARY ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY))
|
||||
{
|
||||
makeHelper[makeHelper.size()-1] = // fill placeholder
|
||||
this->PostBuildMakeTarget(target.GetName(), "$(CONFIGURATION)");
|
||||
@ -549,7 +549,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||
dir.c_str());
|
||||
}
|
||||
|
||||
if(target.GetType() != cmTarget::INTERFACE_LIBRARY
|
||||
if(target.GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& !target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
||||
{
|
||||
allbuild->AddUtility(target.GetName());
|
||||
@ -1100,13 +1100,13 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
|
||||
continue;
|
||||
}
|
||||
|
||||
if(cmtarget.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(cmtarget.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(cmtarget.GetType() == cmTarget::UTILITY ||
|
||||
cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if(cmtarget.GetType() == cmState::UTILITY ||
|
||||
cmtarget.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
cmXCodeObject* t = this->CreateUtilityTarget(cmtarget);
|
||||
if (!t)
|
||||
@ -1366,9 +1366,9 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguages()
|
||||
void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
|
||||
{
|
||||
// This matters only for targets that link.
|
||||
if(cmtarget.GetType() != cmTarget::EXECUTABLE &&
|
||||
cmtarget.GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
cmtarget.GetType() != cmTarget::MODULE_LIBRARY)
|
||||
if(cmtarget.GetType() != cmState::EXECUTABLE &&
|
||||
cmtarget.GetType() != cmState::SHARED_LIBRARY &&
|
||||
cmtarget.GetType() != cmState::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1467,7 +1467,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases,
|
||||
std::vector<cmCustomCommand> postbuild
|
||||
= cmtarget.GetPostBuildCommands();
|
||||
|
||||
if(cmtarget.GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if(cmtarget.GetType() == cmState::SHARED_LIBRARY &&
|
||||
!cmtarget.IsFrameworkOnApple())
|
||||
{
|
||||
cmCustomCommandLines cmd;
|
||||
@ -1786,17 +1786,17 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
cmXCodeObject* buildSettings,
|
||||
const std::string& configName)
|
||||
{
|
||||
if(target.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(target.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::string defFlags;
|
||||
bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||
(target.GetType() == cmTarget::MODULE_LIBRARY));
|
||||
bool binary = ((target.GetType() == cmTarget::OBJECT_LIBRARY) ||
|
||||
(target.GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||
(target.GetType() == cmTarget::EXECUTABLE) ||
|
||||
bool shared = ((target.GetType() == cmState::SHARED_LIBRARY) ||
|
||||
(target.GetType() == cmState::MODULE_LIBRARY));
|
||||
bool binary = ((target.GetType() == cmState::OBJECT_LIBRARY) ||
|
||||
(target.GetType() == cmState::STATIC_LIBRARY) ||
|
||||
(target.GetType() == cmState::EXECUTABLE) ||
|
||||
shared);
|
||||
|
||||
// Compute the compilation flags for each language.
|
||||
@ -1858,15 +1858,15 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
|
||||
std::string extraLinkOptionsVar;
|
||||
std::string extraLinkOptions;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||
if(target.GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
extraLinkOptionsVar = "CMAKE_EXE_LINKER_FLAGS";
|
||||
}
|
||||
else if(target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
else if(target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
extraLinkOptionsVar = "CMAKE_SHARED_LINKER_FLAGS";
|
||||
}
|
||||
else if(target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
else if(target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
extraLinkOptionsVar = "CMAKE_MODULE_LINKER_FLAGS";
|
||||
}
|
||||
@ -1878,8 +1878,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
configName);
|
||||
}
|
||||
|
||||
if(target.GetType() == cmTarget::OBJECT_LIBRARY ||
|
||||
target.GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(target.GetType() == cmState::OBJECT_LIBRARY ||
|
||||
target.GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
this->CurrentLocalGenerator
|
||||
->GetStaticLibraryFlags(extraLinkOptions,
|
||||
@ -1969,10 +1969,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
|
||||
// Set attributes to specify the proper name for the target.
|
||||
std::string pndir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
|
||||
if(target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
target.GetType() == cmTarget::EXECUTABLE)
|
||||
if(target.GetType() == cmState::STATIC_LIBRARY ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY ||
|
||||
target.GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
if(this->XcodeVersion >= 21)
|
||||
{
|
||||
@ -2000,7 +2000,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
|
||||
this->CreateString(pnsuffix.c_str()));
|
||||
}
|
||||
else if(target.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
else if(target.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
pnprefix = "lib";
|
||||
pnbase = target.GetName();
|
||||
@ -2031,15 +2031,15 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
// Handle settings for each target type.
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
{
|
||||
buildSettings->AddAttribute("LIBRARY_STYLE",
|
||||
this->CreateString("STATIC"));
|
||||
break;
|
||||
}
|
||||
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
buildSettings->AddAttribute("LIBRARY_STYLE",
|
||||
this->CreateString("BUNDLE"));
|
||||
@ -2098,7 +2098,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
{
|
||||
if(target.GetPropertyAsBool("FRAMEWORK"))
|
||||
{
|
||||
@ -2135,7 +2135,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
this->CreateString("DYNAMIC"));
|
||||
break;
|
||||
}
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
{
|
||||
// Add the flags to create an executable.
|
||||
std::string createFlags =
|
||||
@ -2327,7 +2327,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
|
||||
// Create the INSTALL_PATH attribute.
|
||||
std::string install_name_dir;
|
||||
if(target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
// Get the install_name directory for the build tree.
|
||||
install_name_dir = gtgt->GetInstallNameDirForBuildTree(configName);
|
||||
@ -2415,7 +2415,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||
}
|
||||
|
||||
// Runtime version information.
|
||||
if(target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
int major;
|
||||
int minor;
|
||||
@ -2550,7 +2550,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
|
||||
this->XCodeObjectMap[&cmtarget] = target;
|
||||
|
||||
// Add source files without build rules for editing convenience.
|
||||
if(cmtarget.GetType() == cmTarget::UTILITY)
|
||||
if(cmtarget.GetType() == cmState::UTILITY)
|
||||
{
|
||||
std::vector<cmSourceFile*> sources;
|
||||
cmGeneratorTarget* gtgt = this->GetGeneratorTarget(&cmtarget);
|
||||
@ -2627,8 +2627,8 @@ const char*
|
||||
cmGlobalXCodeGenerator::GetTargetLinkFlagsVar(cmTarget const& cmtarget) const
|
||||
{
|
||||
if(this->XcodeVersion >= 60 &&
|
||||
(cmtarget.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
cmtarget.GetType() == cmTarget::OBJECT_LIBRARY))
|
||||
(cmtarget.GetType() == cmState::STATIC_LIBRARY ||
|
||||
cmtarget.GetType() == cmState::OBJECT_LIBRARY))
|
||||
{
|
||||
return "OTHER_LIBTOOLFLAGS";
|
||||
}
|
||||
@ -2643,10 +2643,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
|
||||
{
|
||||
switch(cmtarget.GetType())
|
||||
{
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "archive.ar";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (cmtarget.IsXCTestOnApple())
|
||||
return "wrapper.cfbundle";
|
||||
else if (cmtarget.IsCFBundleOnApple())
|
||||
@ -2654,10 +2654,10 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
|
||||
else
|
||||
return ((this->XcodeVersion >= 22)?
|
||||
"compiled.mach-o.executable" : "compiled.mach-o.dylib");
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
|
||||
"wrapper.framework" : "compiled.mach-o.dylib");
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return "compiled.mach-o.executable";
|
||||
default: break;
|
||||
}
|
||||
@ -2669,10 +2669,10 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget)
|
||||
{
|
||||
switch(cmtarget.GetType())
|
||||
{
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "com.apple.product-type.library.static";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (cmtarget.IsXCTestOnApple())
|
||||
return "com.apple.product-type.bundle.unit-test";
|
||||
else if (cmtarget.IsCFBundleOnApple())
|
||||
@ -2681,11 +2681,11 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget)
|
||||
return ((this->XcodeVersion >= 22)?
|
||||
"com.apple.product-type.tool" :
|
||||
"com.apple.product-type.library.dynamic");
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return (cmtarget.GetPropertyAsBool("FRAMEWORK")?
|
||||
"com.apple.product-type.framework" :
|
||||
"com.apple.product-type.library.dynamic");
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return (cmtarget.GetPropertyAsBool("MACOSX_BUNDLE")?
|
||||
"com.apple.product-type.application" :
|
||||
"com.apple.product-type.tool");
|
||||
@ -2699,7 +2699,7 @@ cmXCodeObject*
|
||||
cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
|
||||
cmXCodeObject* buildPhases)
|
||||
{
|
||||
if(cmtarget.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(cmtarget.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -2734,7 +2734,7 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
|
||||
fileRef->AddAttribute("explicitFileType", this->CreateString(fileType));
|
||||
}
|
||||
std::string fullName;
|
||||
if(cmtarget.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(cmtarget.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
fullName = "lib";
|
||||
fullName += cmtarget.GetName();
|
||||
@ -2909,7 +2909,7 @@ void cmGlobalXCodeGenerator
|
||||
::AddDependAndLinkInformation(cmXCodeObject* target)
|
||||
{
|
||||
cmTarget* cmtarget = target->GetTarget();
|
||||
if(cmtarget->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(cmtarget->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2958,8 +2958,8 @@ void cmGlobalXCodeGenerator
|
||||
}
|
||||
|
||||
// Skip link information for object libraries.
|
||||
if(cmtarget->GetType() == cmTarget::OBJECT_LIBRARY ||
|
||||
cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(cmtarget->GetType() == cmState::OBJECT_LIBRARY ||
|
||||
cmtarget->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -3024,7 +3024,7 @@ void cmGlobalXCodeGenerator
|
||||
linkLibs += this->XCodeEscapePath(li->Value.c_str());
|
||||
}
|
||||
else if (!li->Target
|
||||
|| li->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
|| li->Target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
linkLibs += li->Value;
|
||||
}
|
||||
@ -3063,11 +3063,11 @@ bool cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
|
||||
// end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source
|
||||
// groups:
|
||||
//
|
||||
if(cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if(cmtarget.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(cmtarget.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(cmtarget.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -3624,21 +3624,21 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
|
||||
cmTarget* t =target->GetTarget();
|
||||
cmGeneratorTarget *gt = this->GetGeneratorTarget(t);
|
||||
|
||||
if(t->GetType() == cmTarget::EXECUTABLE ||
|
||||
if(t->GetType() == cmState::EXECUTABLE ||
|
||||
// Nope - no post-build for OBJECT_LIRBRARY
|
||||
// t->GetType() == cmTarget::OBJECT_LIBRARY ||
|
||||
t->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
t->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
t->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
// t->GetType() == cmState::OBJECT_LIBRARY ||
|
||||
t->GetType() == cmState::STATIC_LIBRARY ||
|
||||
t->GetType() == cmState::SHARED_LIBRARY ||
|
||||
t->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
// Declare an entry point for the target post-build phase.
|
||||
makefileStream << this->PostBuildMakeTarget(t->GetName(), *ct)
|
||||
<< ":\n";
|
||||
}
|
||||
|
||||
if(t->GetType() == cmTarget::EXECUTABLE ||
|
||||
t->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
t->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(t->GetType() == cmState::EXECUTABLE ||
|
||||
t->GetType() == cmState::SHARED_LIBRARY ||
|
||||
t->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
std::string tfull = gt->GetFullPath(configName);
|
||||
std::string trel = this->ConvertToRelativeForMake(tfull.c_str());
|
||||
|
@ -26,13 +26,13 @@ static const char* getShapeForTarget(const cmTarget* target)
|
||||
|
||||
switch ( target->GetType() )
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return "house";
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "diamond";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return "polygon";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return "octagon";
|
||||
default:
|
||||
break;
|
||||
@ -582,18 +582,18 @@ bool cmGraphVizWriter::IgnoreThisTarget(const std::string& name)
|
||||
}
|
||||
|
||||
|
||||
bool cmGraphVizWriter::GenerateForTargetType(cmTarget::TargetType targetType)
|
||||
bool cmGraphVizWriter::GenerateForTargetType(cmState::TargetType targetType)
|
||||
const
|
||||
{
|
||||
switch (targetType)
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return this->GenerateForExecutables;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return this->GenerateForStaticLibs;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return this->GenerateForSharedLibs;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return this->GenerateForModuleLibs;
|
||||
default:
|
||||
break;
|
||||
|
@ -62,7 +62,7 @@ protected:
|
||||
|
||||
bool IgnoreThisTarget(const std::string& name);
|
||||
|
||||
bool GenerateForTargetType(cmTarget::TargetType targetType) const;
|
||||
bool GenerateForTargetType(cmState::TargetType targetType) const;
|
||||
|
||||
std::string GraphType;
|
||||
std::string GraphName;
|
||||
|
@ -77,7 +77,7 @@ bool cmIncludeExternalMSProjectCommand
|
||||
}
|
||||
|
||||
// Create a target instance for this utility.
|
||||
cmTarget* target=this->Makefile->AddNewTarget(cmTarget::UTILITY,
|
||||
cmTarget* target=this->Makefile->AddNewTarget(cmState::UTILITY,
|
||||
utility_name.c_str());
|
||||
|
||||
target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str());
|
||||
|
@ -383,12 +383,12 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
if(cmTarget* target=this->Makefile->FindTarget(*targetIt))
|
||||
{
|
||||
// Found the target. Check its type.
|
||||
if(target->GetType() != cmTarget::EXECUTABLE &&
|
||||
target->GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
target->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
target->GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
target->GetType() != cmTarget::OBJECT_LIBRARY &&
|
||||
target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if(target->GetType() != cmState::EXECUTABLE &&
|
||||
target->GetType() != cmState::STATIC_LIBRARY &&
|
||||
target->GetType() != cmState::SHARED_LIBRARY &&
|
||||
target->GetType() != cmState::MODULE_LIBRARY &&
|
||||
target->GetType() != cmState::OBJECT_LIBRARY &&
|
||||
target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "TARGETS given target \"" << (*targetIt)
|
||||
@ -396,7 +396,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
else if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
else if(target->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "TARGETS given OBJECT library \"" << (*targetIt)
|
||||
@ -449,7 +449,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
{
|
||||
// Shared libraries are handled differently on DLL and non-DLL
|
||||
// platforms. All windows platforms are DLL platforms including
|
||||
@ -532,7 +532,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
{
|
||||
// Static libraries use ARCHIVE properties.
|
||||
if (!archiveArgs.GetDestination().empty())
|
||||
@ -550,7 +550,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
// Modules use LIBRARY properties.
|
||||
if (!libraryArgs.GetDestination().empty())
|
||||
@ -571,7 +571,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
{
|
||||
if(target.IsAppBundleOnApple())
|
||||
{
|
||||
@ -635,7 +635,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
// Nothing to do. An INTERFACE_LIBRARY can be installed, but the
|
||||
// only effect of that is to make it exportable. It installs no
|
||||
// other files itself.
|
||||
@ -654,7 +654,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
bool createInstallGeneratorsForTargetFileSets = true;
|
||||
|
||||
if(target.IsFrameworkOnApple()
|
||||
|| target.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
|| target.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
createInstallGeneratorsForTargetFileSets = false;
|
||||
}
|
||||
|
@ -94,29 +94,28 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||
std::vector<std::string> filesFrom;
|
||||
std::vector<std::string> filesTo;
|
||||
std::string literal_args;
|
||||
cmTarget::TargetType targetType =
|
||||
static_cast<cmTarget::TargetType>(this->Target->GetType());
|
||||
cmState::TargetType targetType = this->Target->GetType();
|
||||
cmInstallType type = cmInstallType();
|
||||
switch(targetType)
|
||||
{
|
||||
case cmTarget::EXECUTABLE: type = cmInstallType_EXECUTABLE; break;
|
||||
case cmTarget::STATIC_LIBRARY: type = cmInstallType_STATIC_LIBRARY; break;
|
||||
case cmTarget::SHARED_LIBRARY: type = cmInstallType_SHARED_LIBRARY; break;
|
||||
case cmTarget::MODULE_LIBRARY: type = cmInstallType_MODULE_LIBRARY; break;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::EXECUTABLE: type = cmInstallType_EXECUTABLE; break;
|
||||
case cmState::STATIC_LIBRARY: type = cmInstallType_STATIC_LIBRARY; break;
|
||||
case cmState::SHARED_LIBRARY: type = cmInstallType_SHARED_LIBRARY; break;
|
||||
case cmState::MODULE_LIBRARY: type = cmInstallType_MODULE_LIBRARY; break;
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
// Not reachable. We never create a cmInstallTargetGenerator for
|
||||
// an INTERFACE_LIBRARY.
|
||||
assert(0 && "INTERFACE_LIBRARY targets have no installable outputs.");
|
||||
break;
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
this->Target->Target->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR,
|
||||
"cmInstallTargetGenerator created with non-installable target.");
|
||||
return;
|
||||
}
|
||||
if(targetType == cmTarget::EXECUTABLE)
|
||||
if(targetType == cmState::EXECUTABLE)
|
||||
{
|
||||
// There is a bug in cmInstallCommand if this fails.
|
||||
assert(this->NamelinkMode == NamelinkModeNone);
|
||||
@ -375,7 +374,7 @@ cmInstallTargetGenerator::GetInstallFilename(cmTarget const* target,
|
||||
cmGeneratorTarget *gtgt = target->GetMakefile()
|
||||
->GetGlobalGenerator()
|
||||
->GetGeneratorTarget(target);
|
||||
if(target->GetType() == cmTarget::EXECUTABLE)
|
||||
if(target->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
std::string targetName;
|
||||
std::string targetNameReal;
|
||||
@ -542,9 +541,9 @@ cmInstallTargetGenerator
|
||||
std::string const& toDestDirPath)
|
||||
{
|
||||
if(this->ImportLibrary ||
|
||||
!(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::EXECUTABLE))
|
||||
!(this->Target->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->Target->GetType() == cmState::EXECUTABLE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -602,7 +601,7 @@ cmInstallTargetGenerator
|
||||
|
||||
// Edit the install_name of the target itself if necessary.
|
||||
std::string new_id;
|
||||
if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(this->Target->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
std::string for_build =
|
||||
this->Target->GetInstallNameDirForBuildTree(config);
|
||||
@ -813,7 +812,7 @@ cmInstallTargetGenerator::AddStripRule(std::ostream& os,
|
||||
|
||||
// don't strip static and import libraries, because it removes the only
|
||||
// symbol table they have so you can't link to them anymore
|
||||
if(this->Target->GetType()==cmTarget::STATIC_LIBRARY || this->ImportLibrary)
|
||||
if(this->Target->GetType()==cmState::STATIC_LIBRARY || this->ImportLibrary)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -844,7 +843,7 @@ cmInstallTargetGenerator::AddRanlibRule(std::ostream& os,
|
||||
const std::string& toDestDirPath)
|
||||
{
|
||||
// Static libraries need ranlib on this platform.
|
||||
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(this->Target->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ bool cmLinkLibrariesCommand
|
||||
return false;
|
||||
}
|
||||
this->Makefile->AddLinkLibrary(*i,
|
||||
cmTarget::DEBUG);
|
||||
DEBUG_LibraryType);
|
||||
}
|
||||
else if (*i == "optimized")
|
||||
{
|
||||
@ -46,7 +46,7 @@ bool cmLinkLibrariesCommand
|
||||
return false;
|
||||
}
|
||||
this->Makefile->AddLinkLibrary(*i,
|
||||
cmTarget::OPTIMIZED);
|
||||
OPTIMIZED_LibraryType);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ void cmLocalGenerator::TraceDependencies()
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->Target->IsImported()
|
||||
|| t->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
|| t->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -472,7 +472,7 @@ void cmLocalGenerator::ComputeTargetManifest()
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
cmGeneratorTarget& target = *t->second;
|
||||
if (target.Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (target.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -760,7 +760,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
|
||||
}
|
||||
if(variable == "TARGET_TYPE")
|
||||
{
|
||||
return cmTarget::GetTargetTypeName(replaceValues.CMTarget->GetType());
|
||||
return cmState::GetTargetTypeName(replaceValues.CMTarget->GetType());
|
||||
}
|
||||
}
|
||||
if(replaceValues.Output)
|
||||
@ -1347,12 +1347,12 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
||||
|
||||
switch(target->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
this->GetStaticLibraryFlags(linkFlags, buildType, target->Target);
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
{
|
||||
linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable);
|
||||
linkFlags += " ";
|
||||
@ -1404,7 +1404,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
||||
*target, false, false, useWatcomQuote);
|
||||
}
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
{
|
||||
linkFlags +=
|
||||
this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
|
||||
@ -1549,7 +1549,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
|
||||
this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
|
||||
|
||||
// Flags to link an executable to shared libraries.
|
||||
if (tgt.GetType() == cmTarget::EXECUTABLE &&
|
||||
if (tgt.GetType() == cmState::EXECUTABLE &&
|
||||
this->StateSnapshot.GetState()->
|
||||
GetGlobalPropertyAsBool("TARGET_SUPPORTS_SHARED_LIBS"))
|
||||
{
|
||||
@ -1631,7 +1631,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
|
||||
ItemVector const& items = cli.GetItems();
|
||||
for(ItemVector::const_iterator li = items.begin(); li != items.end(); ++li)
|
||||
{
|
||||
if(li->Target && li->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(li->Target && li->Target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -1817,8 +1817,8 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
||||
if(cmSystemTools::FileIsFullPath(inName.c_str()))
|
||||
{
|
||||
std::string tLocation;
|
||||
if(target->GetType() >= cmTarget::EXECUTABLE &&
|
||||
target->GetType() <= cmTarget::MODULE_LIBRARY)
|
||||
if(target->GetType() >= cmState::EXECUTABLE &&
|
||||
target->GetType() <= cmState::MODULE_LIBRARY)
|
||||
{
|
||||
tLocation = target->GetLocation(config);
|
||||
tLocation = cmSystemTools::GetFilenamePath(tLocation);
|
||||
@ -1838,23 +1838,23 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
||||
}
|
||||
switch (target->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
dep = target->GetLocation(config);
|
||||
return true;
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
// An object library has no single file on which to depend.
|
||||
// This was listed to get the target-level dependency.
|
||||
return false;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
// An interface library has no file on which to depend.
|
||||
// This was listed to get the target-level dependency.
|
||||
return false;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
// A utility target has no file on which to depend. This was listed
|
||||
// only to get the target-level dependency.
|
||||
return false;
|
||||
@ -2104,8 +2104,8 @@ void cmLocalGenerator
|
||||
|
||||
std::string warnCMP0063;
|
||||
std::string *pWarnCMP0063 = 0;
|
||||
if (target->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
target->GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
if (target->GetType() != cmState::SHARED_LIBRARY &&
|
||||
target->GetType() != cmState::MODULE_LIBRARY &&
|
||||
!target->IsExecutableWithExports())
|
||||
{
|
||||
switch (target->GetPolicyStatusCMP0063())
|
||||
@ -2134,7 +2134,7 @@ void cmLocalGenerator
|
||||
w <<
|
||||
cmPolicies::GetPolicyWarning(cmPolicies::CMP0063) << "\n"
|
||||
"Target \"" << target->GetName() << "\" of "
|
||||
"type \"" << cmTarget::GetTargetTypeName(target->GetType()) << "\" "
|
||||
"type \"" << cmState::GetTargetTypeName(target->GetType()) << "\" "
|
||||
"has the following visibility properties set for " << lang << ":\n" <<
|
||||
warnCMP0063 <<
|
||||
"For compatibility CMake is not honoring them for this target.";
|
||||
@ -2151,8 +2151,8 @@ void cmLocalGenerator::AddCMP0018Flags(std::string &flags,
|
||||
{
|
||||
int targetType = target->GetType();
|
||||
|
||||
bool shared = ((targetType == cmTarget::SHARED_LIBRARY) ||
|
||||
(targetType == cmTarget::MODULE_LIBRARY));
|
||||
bool shared = ((targetType == cmState::SHARED_LIBRARY) ||
|
||||
(targetType == cmState::MODULE_LIBRARY));
|
||||
|
||||
if (this->GetShouldUseOldFlags(shared, lang))
|
||||
{
|
||||
@ -2160,7 +2160,7 @@ void cmLocalGenerator::AddCMP0018Flags(std::string &flags,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if (target->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
if (target->GetPropertyAsBool("POSITION_INDEPENDENT_CODE"))
|
||||
{
|
||||
@ -2234,7 +2234,7 @@ void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags,
|
||||
{
|
||||
const char* picFlags = 0;
|
||||
|
||||
if(targetType == cmTarget::EXECUTABLE)
|
||||
if(targetType == cmState::EXECUTABLE)
|
||||
{
|
||||
std::string flagsVar = "CMAKE_";
|
||||
flagsVar += lang;
|
||||
@ -2512,7 +2512,7 @@ cmLocalGenerator
|
||||
cmTargets& tgts = this->Makefile->GetTargets();
|
||||
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
|
||||
{
|
||||
if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -2540,9 +2540,9 @@ cmLocalGenerator
|
||||
// Generate the proper install generator for this target type.
|
||||
switch(l->second.GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
// Use a target install generator.
|
||||
cmInstallTargetGeneratorLocal
|
||||
@ -2550,7 +2550,7 @@ cmLocalGenerator
|
||||
g.Generate(os, config, configurationTypes);
|
||||
}
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
{
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
// Special code to handle DLL. Install the import library
|
||||
|
@ -31,7 +31,7 @@ void cmLocalGhsMultiGenerator::Generate()
|
||||
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
||||
++l)
|
||||
{
|
||||
if (l->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if (l->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| l->second->Target->IsImported())
|
||||
{
|
||||
continue;
|
||||
|
@ -77,7 +77,7 @@ void cmLocalNinjaGenerator::Generate()
|
||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| t->second->Target->IsImported())
|
||||
{
|
||||
continue;
|
||||
|
@ -119,7 +119,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| t->second->Target->IsImported())
|
||||
{
|
||||
continue;
|
||||
@ -180,7 +180,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
|
||||
ti != targets.end(); ++ti)
|
||||
{
|
||||
cmGeneratorTarget* gt = ti->second;
|
||||
if (gt->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (gt->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -423,12 +423,12 @@ void cmLocalUnixMakefileGenerator3
|
||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if((t->second->GetType() == cmTarget::EXECUTABLE) ||
|
||||
(t->second->GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||
(t->second->GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||
(t->second->GetType() == cmTarget::MODULE_LIBRARY) ||
|
||||
(t->second->GetType() == cmTarget::OBJECT_LIBRARY) ||
|
||||
(t->second->GetType() == cmTarget::UTILITY))
|
||||
if((t->second->GetType() == cmState::EXECUTABLE) ||
|
||||
(t->second->GetType() == cmState::STATIC_LIBRARY) ||
|
||||
(t->second->GetType() == cmState::SHARED_LIBRARY) ||
|
||||
(t->second->GetType() == cmState::MODULE_LIBRARY) ||
|
||||
(t->second->GetType() == cmState::OBJECT_LIBRARY) ||
|
||||
(t->second->GetType() == cmState::UTILITY))
|
||||
{
|
||||
if (t->second->Target->IsImported())
|
||||
{
|
||||
@ -1772,7 +1772,7 @@ void cmLocalUnixMakefileGenerator3
|
||||
cmTargets::iterator glIt;
|
||||
for ( glIt = targets->begin(); glIt != targets->end(); ++ glIt )
|
||||
{
|
||||
if ( glIt->second.GetType() == cmTarget::GLOBAL_TARGET )
|
||||
if ( glIt->second.GetType() == cmState::GLOBAL_TARGET )
|
||||
{
|
||||
std::string targetString = "Special rule for the target " + glIt->first;
|
||||
std::vector<std::string> commands;
|
||||
|
@ -77,7 +77,7 @@ void cmLocalVisualStudio10Generator::Generate()
|
||||
cmTargets &tgts = this->Makefile->GetTargets();
|
||||
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
|
||||
{
|
||||
if(l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ void cmLocalVisualStudio6Generator::AddCMakeListsRules()
|
||||
for(cmTargets::iterator l = tgts.begin();
|
||||
l != tgts.end(); l++)
|
||||
{
|
||||
if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
|| l->second.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (l->second.GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| l->second.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -132,22 +132,22 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
|
||||
{
|
||||
switch(l->second.GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
this->SetBuildType(STATIC_LIBRARY, l->first.c_str(), l->second);
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
this->SetBuildType(DLL, l->first.c_str(), l->second);
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
this->SetBuildType(EXECUTABLE,l->first.c_str(), l->second);
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
this->SetBuildType(UTILITY, l->first.c_str(), l->second);
|
||||
break;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
continue;
|
||||
default:
|
||||
cmSystemTools::Error("Bad target type: ", l->first.c_str());
|
||||
@ -263,8 +263,8 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
|
||||
// special care for dependencies. The first rule must depend on all
|
||||
// the dependencies of all the rules. The later rules must each
|
||||
// depend only on the previous rule.
|
||||
if ((target.GetType() == cmTarget::UTILITY ||
|
||||
target.GetType() == cmTarget::GLOBAL_TARGET) &&
|
||||
if ((target.GetType() == cmState::UTILITY ||
|
||||
target.GetType() == cmState::GLOBAL_TARGET) &&
|
||||
(!target.GetPreBuildCommands().empty() ||
|
||||
!target.GetPostBuildCommands().empty()))
|
||||
{
|
||||
@ -482,8 +482,8 @@ void cmLocalVisualStudio6Generator
|
||||
cmSystemTools::ExpandListArgument(dependsValue, depends);
|
||||
}
|
||||
if (GetVS6TargetName(source) != libName ||
|
||||
target.GetType() == cmTarget::UTILITY ||
|
||||
target.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
target.GetType() == cmState::UTILITY ||
|
||||
target.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
fout << "# Begin Source File\n\n";
|
||||
|
||||
@ -804,7 +804,7 @@ cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmTarget& target,
|
||||
|
||||
// VS6 forgets to create the output directory for archives if it
|
||||
// differs from the intermediate directory.
|
||||
if(target.GetType() != cmTarget::STATIC_LIBRARY) { return pcc; }
|
||||
if(target.GetType() != cmState::STATIC_LIBRARY) { return pcc; }
|
||||
|
||||
cmGeneratorTarget* gt =
|
||||
this->GlobalGenerator->GetGeneratorTarget(&target);
|
||||
@ -835,7 +835,7 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
|
||||
const std::string& configName,
|
||||
const std::string& /* libName */)
|
||||
{
|
||||
if (target.GetType() >= cmTarget::UTILITY )
|
||||
if (target.GetType() >= cmState::UTILITY )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@ -948,8 +948,8 @@ void cmLocalVisualStudio6Generator
|
||||
const std::string& libName, cmTarget &target,
|
||||
std::vector<cmSourceGroup> &)
|
||||
{
|
||||
bool targetBuilds = (target.GetType() >= cmTarget::EXECUTABLE &&
|
||||
target.GetType() <= cmTarget::MODULE_LIBRARY);
|
||||
bool targetBuilds = (target.GetType() >= cmState::EXECUTABLE &&
|
||||
target.GetType() <= cmState::MODULE_LIBRARY);
|
||||
#ifdef CM_USE_OLD_VS6
|
||||
// Lookup the library and executable output directories.
|
||||
std::string libPath;
|
||||
@ -1108,12 +1108,12 @@ void cmLocalVisualStudio6Generator
|
||||
// add libraries to executables and dlls (but never include
|
||||
// a library in a library, bad recursion)
|
||||
// NEVER LINK STATIC LIBRARIES TO OTHER STATIC LIBRARIES
|
||||
if ((target.GetType() != cmTarget::SHARED_LIBRARY
|
||||
&& target.GetType() != cmTarget::STATIC_LIBRARY
|
||||
&& target.GetType() != cmTarget::MODULE_LIBRARY) ||
|
||||
(target.GetType()==cmTarget::SHARED_LIBRARY
|
||||
if ((target.GetType() != cmState::SHARED_LIBRARY
|
||||
&& target.GetType() != cmState::STATIC_LIBRARY
|
||||
&& target.GetType() != cmState::MODULE_LIBRARY) ||
|
||||
(target.GetType()==cmState::SHARED_LIBRARY
|
||||
&& libName != GetVS6TargetName(j->first)) ||
|
||||
(target.GetType()==cmTarget::MODULE_LIBRARY
|
||||
(target.GetType()==cmState::MODULE_LIBRARY
|
||||
&& libName != GetVS6TargetName(j->first)))
|
||||
{
|
||||
// Compute the proper name to use to link this library.
|
||||
@ -1145,7 +1145,7 @@ void cmLocalVisualStudio6Generator
|
||||
libDebug =
|
||||
this->ConvertToOutputFormat(libDebug.c_str(), SHELL);
|
||||
|
||||
if (j->second == cmTarget::GENERAL)
|
||||
if (j->second == GENERAL_LibraryType)
|
||||
{
|
||||
libOptions += " ";
|
||||
libOptions += lib;
|
||||
@ -1156,7 +1156,7 @@ void cmLocalVisualStudio6Generator
|
||||
libMultiLineOptionsForDebug += libDebug;
|
||||
libMultiLineOptionsForDebug += "\n";
|
||||
}
|
||||
if (j->second == cmTarget::DEBUG)
|
||||
if (j->second == DEBUG_LibraryType)
|
||||
{
|
||||
libDebugOptions += " ";
|
||||
libDebugOptions += lib;
|
||||
@ -1165,7 +1165,7 @@ void cmLocalVisualStudio6Generator
|
||||
libMultiLineDebugOptions += libDebug;
|
||||
libMultiLineDebugOptions += "\n";
|
||||
}
|
||||
if (j->second == cmTarget::OPTIMIZED)
|
||||
if (j->second == OPTIMIZED_LibraryType)
|
||||
{
|
||||
libOptimizedOptions += " ";
|
||||
libOptimizedOptions += lib;
|
||||
@ -1195,7 +1195,7 @@ void cmLocalVisualStudio6Generator
|
||||
std::string extraLinkOptionsRelease;
|
||||
std::string extraLinkOptionsMinSizeRel;
|
||||
std::string extraLinkOptionsRelWithDebInfo;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||
if(target.GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
extraLinkOptions = this->Makefile->
|
||||
GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
|
||||
@ -1208,7 +1208,7 @@ void cmLocalVisualStudio6Generator
|
||||
extraLinkOptionsRelWithDebInfo = this->Makefile->
|
||||
GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO");
|
||||
}
|
||||
if(target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
extraLinkOptions = this->Makefile->
|
||||
GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
|
||||
@ -1221,7 +1221,7 @@ void cmLocalVisualStudio6Generator
|
||||
extraLinkOptionsRelWithDebInfo = this->Makefile->
|
||||
GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO");
|
||||
}
|
||||
if(target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
extraLinkOptions = this->Makefile->
|
||||
GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
|
||||
@ -1313,9 +1313,9 @@ void cmLocalVisualStudio6Generator
|
||||
|
||||
// Compute version number information.
|
||||
std::string targetVersionFlag;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::EXECUTABLE ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
int major;
|
||||
int minor;
|
||||
@ -1332,10 +1332,10 @@ void cmLocalVisualStudio6Generator
|
||||
std::string outputNameRelease = outputName;
|
||||
std::string outputNameMinSizeRel = outputName;
|
||||
std::string outputNameRelWithDebInfo = outputName;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE ||
|
||||
target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::EXECUTABLE ||
|
||||
target.GetType() == cmState::STATIC_LIBRARY ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
outputName = gt->GetFullName();
|
||||
outputNameDebug = gt->GetFullName("Debug");
|
||||
@ -1343,7 +1343,7 @@ void cmLocalVisualStudio6Generator
|
||||
outputNameMinSizeRel = gt->GetFullName("MinSizeRel");
|
||||
outputNameRelWithDebInfo = gt->GetFullName("RelWithDebInfo");
|
||||
}
|
||||
else if(target.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
else if(target.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
outputName = target.GetName();
|
||||
outputName += ".lib";
|
||||
@ -1359,10 +1359,10 @@ void cmLocalVisualStudio6Generator
|
||||
std::string outputDirRelease;
|
||||
std::string outputDirMinSizeRel;
|
||||
std::string outputDirRelWithDebInfo;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE ||
|
||||
target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::EXECUTABLE ||
|
||||
target.GetType() == cmState::STATIC_LIBRARY ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
#ifdef CM_USE_OLD_VS6
|
||||
outputDirOld =
|
||||
@ -1382,7 +1382,7 @@ void cmLocalVisualStudio6Generator
|
||||
removeQuotes(this->ConvertToOutputFormat(
|
||||
gt->GetDirectory("RelWithDebInfo").c_str(), SHELL));
|
||||
}
|
||||
else if(target.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
else if(target.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::string outputDir = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||
outputDirDebug = outputDir + "Debug";
|
||||
@ -1396,9 +1396,9 @@ void cmLocalVisualStudio6Generator
|
||||
std::string optionsRelease;
|
||||
std::string optionsMinSizeRel;
|
||||
std::string optionsRelWithDebInfo;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE ||
|
||||
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::EXECUTABLE ||
|
||||
target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
extraLinkOptionsDebug =
|
||||
extraLinkOptions + " " + extraLinkOptionsDebug;
|
||||
@ -1424,9 +1424,9 @@ void cmLocalVisualStudio6Generator
|
||||
std::string targetImplibFlagRelease;
|
||||
std::string targetImplibFlagMinSizeRel;
|
||||
std::string targetImplibFlagRelWithDebInfo;
|
||||
if(target.GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
target.GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
target.GetType() == cmTarget::EXECUTABLE)
|
||||
if(target.GetType() == cmState::SHARED_LIBRARY ||
|
||||
target.GetType() == cmState::MODULE_LIBRARY ||
|
||||
target.GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
std::string fullPathImpDebug = gt->GetDirectory("Debug", true);
|
||||
std::string fullPathImpRelease = gt->GetDirectory("Release", true);
|
||||
@ -1494,7 +1494,7 @@ void cmLocalVisualStudio6Generator
|
||||
std::string staticLibOptionsRelease;
|
||||
std::string staticLibOptionsMinSizeRel;
|
||||
std::string staticLibOptionsRelWithDebInfo;
|
||||
if(target.GetType() == cmTarget::STATIC_LIBRARY )
|
||||
if(target.GetType() == cmState::STATIC_LIBRARY )
|
||||
{
|
||||
const char *libflagsGlobal =
|
||||
this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS");
|
||||
@ -1567,8 +1567,8 @@ void cmLocalVisualStudio6Generator
|
||||
libnameExports.c_str());
|
||||
cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG",
|
||||
mfcFlag);
|
||||
if(target.GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
target.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(target.GetType() == cmState::STATIC_LIBRARY ||
|
||||
target.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_DEBUG",
|
||||
staticLibOptionsDebug.c_str());
|
||||
@ -1674,7 +1674,7 @@ void cmLocalVisualStudio6Generator
|
||||
(exePath.c_str(), SHELL)).c_str());
|
||||
#endif
|
||||
|
||||
if(targetBuilds || target.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(targetBuilds || target.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_DEBUG",
|
||||
outputDirDebug.c_str());
|
||||
@ -1698,8 +1698,8 @@ void cmLocalVisualStudio6Generator
|
||||
= this->Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX");
|
||||
cmSystemTools::ReplaceString(line, "DEBUG_POSTFIX",
|
||||
debugPostfix?debugPostfix:"");
|
||||
if(target.GetType() >= cmTarget::EXECUTABLE &&
|
||||
target.GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(target.GetType() >= cmState::EXECUTABLE &&
|
||||
target.GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
// store flags for each configuration
|
||||
std::string flags = " ";
|
||||
@ -1899,7 +1899,7 @@ void cmLocalVisualStudio6Generator
|
||||
this->ConvertToOutputFormat(l->Value.c_str(), SHELL);
|
||||
}
|
||||
else if (!l->Target
|
||||
|| l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
|| l->Target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
options += l->Value;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void cmLocalVisualStudio7Generator::AddHelperCommands()
|
||||
|
||||
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
|
||||
{
|
||||
if(l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -106,7 +106,7 @@ void cmLocalVisualStudio7Generator::AddCMakeListsRules()
|
||||
// Add the rule to targets that need it.
|
||||
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
|
||||
{
|
||||
if (l->second.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (l->second.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -131,7 +131,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
|
||||
l != tgts.end(); l++)
|
||||
{
|
||||
cmTarget& tgt = l->second;
|
||||
if(tgt.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if(tgt.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
std::vector<std::string> no_depends;
|
||||
cmCustomCommandLine force_command;
|
||||
@ -182,7 +182,7 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles()
|
||||
for(cmTargets::iterator l = tgts.begin();
|
||||
l != tgts.end(); l++)
|
||||
{
|
||||
if(l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -672,22 +672,22 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
targetBuilds = false; // no manifest tool for object library
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
projectType = "typeStaticLibrary";
|
||||
configType = "4";
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
projectType = "typeDynamicLibrary";
|
||||
configType = "2";
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
configType = "1";
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
configType = "10";
|
||||
default:
|
||||
targetBuilds = false;
|
||||
@ -788,10 +788,10 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||
intermediateDir += "/";
|
||||
intermediateDir += configName;
|
||||
|
||||
if (target.GetType() < cmTarget::UTILITY)
|
||||
if (target.GetType() < cmState::UTILITY)
|
||||
{
|
||||
std::string const& outDir =
|
||||
target.GetType() == cmTarget::OBJECT_LIBRARY?
|
||||
target.GetType() == cmState::OBJECT_LIBRARY?
|
||||
intermediateDir : gt->GetDirectory(configName);
|
||||
fout << "\t\t\tOutputDirectory=\""
|
||||
<< this->ConvertToXMLOutputPathSingle(outDir.c_str()) << "\"\n";
|
||||
@ -882,7 +882,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||
targetOptions.OutputFlagMap(fout, "\t\t\t\t");
|
||||
targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n", "CXX");
|
||||
fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n";
|
||||
if(target.GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(target.GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
// Specify the compiler program database file if configured.
|
||||
std::string pdb = gt->GetCompilePDBPath(configName);
|
||||
@ -1045,21 +1045,21 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
|
||||
std::string temp;
|
||||
std::string extraLinkOptions;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||
if(target.GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
extraLinkOptions =
|
||||
this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS")
|
||||
+ std::string(" ")
|
||||
+ GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName);
|
||||
}
|
||||
if(target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
extraLinkOptions =
|
||||
this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS")
|
||||
+ std::string(" ")
|
||||
+ GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName);
|
||||
}
|
||||
if(target.GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(target.GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
extraLinkOptions =
|
||||
this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS")
|
||||
@ -1099,7 +1099,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
cmGeneratorTarget* gt =
|
||||
this->GlobalGenerator->GetGeneratorTarget(&target);
|
||||
|
||||
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (target.GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if (target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -1109,9 +1109,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
}
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
break;
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
{
|
||||
std::string libpath = this->GetTargetDirectory(gt);
|
||||
libpath += "/";
|
||||
@ -1127,7 +1127,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
<< this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n";
|
||||
break;
|
||||
}
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
{
|
||||
std::string targetNameFull = gt->GetFullName(configName);
|
||||
std::string libpath = gt->GetDirectory(configName);
|
||||
@ -1161,8 +1161,8 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
<< this->ConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n";
|
||||
break;
|
||||
}
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
{
|
||||
std::string targetName;
|
||||
std::string targetNameSO;
|
||||
@ -1260,7 +1260,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
fout << "/>\n";
|
||||
}
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
{
|
||||
std::string targetName;
|
||||
std::string targetNameFull;
|
||||
@ -1374,9 +1374,9 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
||||
<< this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n";
|
||||
break;
|
||||
}
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1408,7 +1408,7 @@ cmLocalVisualStudio7GeneratorInternals
|
||||
fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " ";
|
||||
}
|
||||
else if (!l->Target
|
||||
|| l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
|| l->Target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
fout << l->Value << " ";
|
||||
}
|
||||
@ -1777,8 +1777,8 @@ bool cmLocalVisualStudio7Generator
|
||||
std::string source = (*sf)->GetFullPath();
|
||||
FCInfo fcinfo(this, target, *(*sf), configs);
|
||||
|
||||
if (source != libName || target.GetType() == cmTarget::UTILITY ||
|
||||
target.GetType() == cmTarget::GLOBAL_TARGET )
|
||||
if (source != libName || target.GetType() == cmState::UTILITY ||
|
||||
target.GetType() == cmState::GLOBAL_TARGET )
|
||||
{
|
||||
fout << "\t\t\t<File\n";
|
||||
std::string d = this->ConvertToXMLOutputPathSingle(source.c_str());
|
||||
@ -2028,7 +2028,7 @@ void cmLocalVisualStudio7Generator
|
||||
cmTarget &target,
|
||||
const std::string& /*libName*/)
|
||||
{
|
||||
if (target.GetType() > cmTarget::GLOBAL_TARGET)
|
||||
if (target.GetType() > cmState::GLOBAL_TARGET)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2045,7 +2045,7 @@ void cmLocalVisualStudio7Generator
|
||||
tool = this->FortranProject? "VFPreLinkEventTool":"VCPreLinkEventTool";
|
||||
event.Start(tool);
|
||||
bool addedPrelink = false;
|
||||
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (target.GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if (target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -2126,30 +2126,30 @@ cmLocalVisualStudio7Generator
|
||||
const char* projectType = 0;
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
projectType = "typeStaticLibrary";
|
||||
if(keyword)
|
||||
{
|
||||
keyword = "Static Library";
|
||||
}
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
projectType = "typeDynamicLibrary";
|
||||
if(!keyword)
|
||||
{
|
||||
keyword = "Dll";
|
||||
}
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
if(!keyword)
|
||||
{
|
||||
keyword = "Console Application";
|
||||
}
|
||||
projectType = 0;
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -89,8 +89,8 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
|
||||
// If an executable exports symbols then VS wants to create an
|
||||
// import library but forgets to create the output directory.
|
||||
// The Intel Fortran plugin always forgets to the directory.
|
||||
if(target.GetType() != cmTarget::EXECUTABLE &&
|
||||
!(isFortran && target.GetType() == cmTarget::SHARED_LIBRARY))
|
||||
if(target.GetType() != cmState::EXECUTABLE &&
|
||||
!(isFortran && target.GetType() == cmState::SHARED_LIBRARY))
|
||||
{ return pcc; }
|
||||
cmGeneratorTarget* gt =
|
||||
this->GetGlobalGenerator()->GetGeneratorTarget(&target);
|
||||
|
@ -759,7 +759,7 @@ void cmMakefile::ConfigureFinalPass()
|
||||
for (cmTargets::iterator l = this->Targets.begin();
|
||||
l != this->Targets.end(); l++)
|
||||
{
|
||||
if (l->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (l->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -810,7 +810,7 @@ cmMakefile::AddCustomCommandToTarget(const std::string& target,
|
||||
return;
|
||||
}
|
||||
|
||||
if(ti->second.GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(ti->second.GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Target \"" << target << "\" is an OBJECT library "
|
||||
@ -818,7 +818,7 @@ cmMakefile::AddCustomCommandToTarget(const std::string& target,
|
||||
this->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return;
|
||||
}
|
||||
if(ti->second.GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(ti->second.GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Target \"" << target << "\" is an INTERFACE library "
|
||||
@ -1184,7 +1184,7 @@ cmMakefile::AddUtilityCommand(const std::string& utilityName,
|
||||
bool uses_terminal)
|
||||
{
|
||||
// Create a target instance for this utility.
|
||||
cmTarget* target = this->AddNewTarget(cmTarget::UTILITY, utilityName);
|
||||
cmTarget* target = this->AddNewTarget(cmState::UTILITY, utilityName);
|
||||
if (excludeFromAll)
|
||||
{
|
||||
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
|
||||
@ -1400,7 +1400,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
|
||||
}
|
||||
|
||||
void cmMakefile::AddLinkLibrary(const std::string& lib,
|
||||
cmTarget::LinkLibraryType llt)
|
||||
cmTargetLinkLibraryType llt)
|
||||
{
|
||||
cmTarget::LibraryID tmp;
|
||||
tmp.first = lib;
|
||||
@ -1410,7 +1410,7 @@ void cmMakefile::AddLinkLibrary(const std::string& lib,
|
||||
|
||||
void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
|
||||
const std::string& lib,
|
||||
cmTarget::LinkLibraryType llt)
|
||||
cmTargetLinkLibraryType llt)
|
||||
{
|
||||
cmTargets::iterator i = this->Targets.find(target);
|
||||
if ( i != this->Targets.end())
|
||||
@ -1419,14 +1419,14 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
|
||||
if(tgt)
|
||||
{
|
||||
// if it is not a static or shared library then you can not link to it
|
||||
if(!((tgt->GetType() == cmTarget::STATIC_LIBRARY) ||
|
||||
(tgt->GetType() == cmTarget::SHARED_LIBRARY) ||
|
||||
(tgt->GetType() == cmTarget::INTERFACE_LIBRARY) ||
|
||||
if(!((tgt->GetType() == cmState::STATIC_LIBRARY) ||
|
||||
(tgt->GetType() == cmState::SHARED_LIBRARY) ||
|
||||
(tgt->GetType() == cmState::INTERFACE_LIBRARY) ||
|
||||
tgt->IsExecutableWithExports()))
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Target \"" << lib << "\" of type "
|
||||
<< cmTarget::GetTargetTypeName(tgt->GetType())
|
||||
<< cmState::GetTargetTypeName(tgt->GetType())
|
||||
<< " may not be linked into another target. "
|
||||
<< "One may link only to STATIC or SHARED libraries, or "
|
||||
<< "to executables with the ENABLE_EXPORTS property set.";
|
||||
@ -1471,7 +1471,7 @@ void cmMakefile::AddLinkDirectoryForTarget(const std::string& target,
|
||||
|
||||
void cmMakefile::AddLinkLibrary(const std::string& lib)
|
||||
{
|
||||
this->AddLinkLibrary(lib,cmTarget::GENERAL);
|
||||
this->AddLinkLibrary(lib,GENERAL_LibraryType);
|
||||
}
|
||||
|
||||
void cmMakefile::InitializeFromParent(cmMakefile* parent)
|
||||
@ -2018,9 +2018,9 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name,
|
||||
// for these targets do not add anything
|
||||
switch(target.GetType())
|
||||
{
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
return;
|
||||
default:;
|
||||
}
|
||||
@ -2057,20 +2057,20 @@ void cmMakefile::AddAlias(const std::string& lname, cmTarget *tgt)
|
||||
}
|
||||
|
||||
cmTarget* cmMakefile::AddLibrary(const std::string& lname,
|
||||
cmTarget::TargetType type,
|
||||
cmState::TargetType type,
|
||||
const std::vector<std::string> &srcs,
|
||||
bool excludeFromAll)
|
||||
{
|
||||
// wrong type ? default to STATIC
|
||||
if ( (type != cmTarget::STATIC_LIBRARY)
|
||||
&& (type != cmTarget::SHARED_LIBRARY)
|
||||
&& (type != cmTarget::MODULE_LIBRARY)
|
||||
&& (type != cmTarget::OBJECT_LIBRARY)
|
||||
&& (type != cmTarget::INTERFACE_LIBRARY))
|
||||
if ( (type != cmState::STATIC_LIBRARY)
|
||||
&& (type != cmState::SHARED_LIBRARY)
|
||||
&& (type != cmState::MODULE_LIBRARY)
|
||||
&& (type != cmState::OBJECT_LIBRARY)
|
||||
&& (type != cmState::INTERFACE_LIBRARY))
|
||||
{
|
||||
this->IssueMessage(cmake::INTERNAL_ERROR,
|
||||
"cmMakefile::AddLibrary given invalid target type.");
|
||||
type = cmTarget::STATIC_LIBRARY;
|
||||
type = cmState::STATIC_LIBRARY;
|
||||
}
|
||||
|
||||
cmTarget* target = this->AddNewTarget(type, lname);
|
||||
@ -2091,7 +2091,7 @@ cmTarget* cmMakefile::AddExecutable(const char *exeName,
|
||||
const std::vector<std::string> &srcs,
|
||||
bool excludeFromAll)
|
||||
{
|
||||
cmTarget* target = this->AddNewTarget(cmTarget::EXECUTABLE, exeName);
|
||||
cmTarget* target = this->AddNewTarget(cmState::EXECUTABLE, exeName);
|
||||
if(excludeFromAll)
|
||||
{
|
||||
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
|
||||
@ -2103,7 +2103,7 @@ cmTarget* cmMakefile::AddExecutable(const char *exeName,
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmTarget*
|
||||
cmMakefile::AddNewTarget(cmTarget::TargetType type, const std::string& name)
|
||||
cmMakefile::AddNewTarget(cmState::TargetType type, const std::string& name)
|
||||
{
|
||||
cmTargets::iterator it =
|
||||
this->Targets.insert(cmTargets::value_type(name, cmTarget())).first;
|
||||
@ -2299,8 +2299,8 @@ void cmMakefile::ExpandVariablesCMP0019()
|
||||
l != this->Targets.end(); ++l)
|
||||
{
|
||||
cmTarget &t = l->second;
|
||||
if (t.GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
|| t.GetType() == cmTarget::GLOBAL_TARGET)
|
||||
if (t.GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| t.GetType() == cmState::GLOBAL_TARGET)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -4178,7 +4178,7 @@ void cmMakefile::RaiseScope(const std::string& var, const char *varDef)
|
||||
//----------------------------------------------------------------------------
|
||||
cmTarget*
|
||||
cmMakefile::AddImportedTarget(const std::string& name,
|
||||
cmTarget::TargetType type,
|
||||
cmState::TargetType type,
|
||||
bool global)
|
||||
{
|
||||
// Create the target.
|
||||
@ -4279,7 +4279,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
|
||||
// The conflict is with a non-imported target.
|
||||
// Allow this if the user has requested support.
|
||||
cmake* cm = this->GetCMakeInstance();
|
||||
if(isCustom && existing->GetType() == cmTarget::UTILITY &&
|
||||
if(isCustom && existing->GetType() == cmState::UTILITY &&
|
||||
this != existing->GetMakefile() &&
|
||||
cm->GetState()
|
||||
->GetGlobalPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS"))
|
||||
@ -4295,22 +4295,22 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
|
||||
<< "The existing target is ";
|
||||
switch(existing->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
e << "an executable ";
|
||||
break;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
e << "a static library ";
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
e << "a shared library ";
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
e << "a module library ";
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
e << "a custom target ";
|
||||
break;
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
e << "an interface library ";
|
||||
break;
|
||||
default: break;
|
||||
|
@ -172,10 +172,10 @@ public:
|
||||
|
||||
/** Create a new imported target with the name and type given. */
|
||||
cmTarget* AddImportedTarget(const std::string& name,
|
||||
cmTarget::TargetType type,
|
||||
cmState::TargetType type,
|
||||
bool global);
|
||||
|
||||
cmTarget* AddNewTarget(cmTarget::TargetType type, const std::string& name);
|
||||
cmTarget* AddNewTarget(cmState::TargetType type, const std::string& name);
|
||||
|
||||
/**
|
||||
* Add an executable to the build.
|
||||
@ -219,9 +219,9 @@ public:
|
||||
* Add a link library to the build.
|
||||
*/
|
||||
void AddLinkLibrary(const std::string&);
|
||||
void AddLinkLibrary(const std::string&, cmTarget::LinkLibraryType type);
|
||||
void AddLinkLibrary(const std::string&, cmTargetLinkLibraryType type);
|
||||
void AddLinkLibraryForTarget(const std::string& tgt, const std::string&,
|
||||
cmTarget::LinkLibraryType type);
|
||||
cmTargetLinkLibraryType type);
|
||||
void AddLinkDirectoryForTarget(const std::string& tgt, const std::string& d);
|
||||
|
||||
/**
|
||||
@ -281,7 +281,7 @@ public:
|
||||
/**
|
||||
* Set the name of the library.
|
||||
*/
|
||||
cmTarget* AddLibrary(const std::string& libname, cmTarget::TargetType type,
|
||||
cmTarget* AddLibrary(const std::string& libname, cmState::TargetType type,
|
||||
const std::vector<std::string> &srcs,
|
||||
bool excludeFromAll = false);
|
||||
void AddAlias(const std::string& libname, cmTarget *tgt);
|
||||
|
@ -26,7 +26,7 @@ cmMakefileLibraryTargetGenerator
|
||||
cmMakefileTargetGenerator(target)
|
||||
{
|
||||
this->CustomCommandDriver = OnDepends;
|
||||
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->GeneratorTarget->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
this->GeneratorTarget->GetLibraryNames(
|
||||
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
|
||||
@ -62,12 +62,12 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
|
||||
|
||||
// write the link rules
|
||||
// Write the rule for this target type.
|
||||
switch(this->Target->GetType())
|
||||
switch(this->GeneratorTarget->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
this->WriteStaticLibraryRules();
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
this->WriteSharedLibraryRules(false);
|
||||
if(this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName))
|
||||
{
|
||||
@ -75,7 +75,7 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
|
||||
this->WriteSharedLibraryRules(true);
|
||||
}
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
this->WriteModuleLibraryRules(false);
|
||||
if(this->GeneratorTarget->NeedRelinkBeforeInstall(this->ConfigName))
|
||||
{
|
||||
@ -83,7 +83,7 @@ void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
|
||||
this->WriteModuleLibraryRules(true);
|
||||
}
|
||||
break;
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
this->WriteObjectLibraryRules();
|
||||
break;
|
||||
default:
|
||||
@ -253,8 +253,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
this->LocalGenerator->AppendFlags(linkFlags, extraFlags);
|
||||
|
||||
// Add OSX version flags, if any.
|
||||
if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true);
|
||||
this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false);
|
||||
@ -351,15 +351,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
// Add the link message.
|
||||
std::string buildEcho = "Linking ";
|
||||
buildEcho += linkLanguage;
|
||||
switch(this->Target->GetType())
|
||||
switch(this->GeneratorTarget->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
buildEcho += " static library ";
|
||||
break;
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
buildEcho += " shared library ";
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (this->Target->IsCFBundleOnApple())
|
||||
buildEcho += " CFBundle";
|
||||
buildEcho += " shared module ";
|
||||
@ -375,12 +375,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
}
|
||||
|
||||
const char* forbiddenFlagVar = 0;
|
||||
switch(this->Target->GetType())
|
||||
switch(this->GeneratorTarget->GetType())
|
||||
{
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS";
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS";
|
||||
break;
|
||||
default: break;
|
||||
@ -429,7 +429,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
#ifdef _WIN32
|
||||
// There may be a manifest file for this target. Add it to the
|
||||
// clean set just in case.
|
||||
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
libCleanFiles.push_back(
|
||||
this->Convert((targetFullPath+".manifest").c_str(),
|
||||
@ -441,7 +441,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
std::vector<std::string> commands1;
|
||||
// Add a command to remove any existing files for this library.
|
||||
// for static libs only
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
|
||||
this->GeneratorTarget, "target");
|
||||
@ -497,7 +497,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
std::vector<std::string> archiveAppendCommands;
|
||||
std::vector<std::string> archiveFinishCommands;
|
||||
std::string::size_type archiveCommandLimit = std::string::npos;
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
haveStaticLibraryRule =
|
||||
this->Makefile->GetDefinition(linkRuleVar)? true:false;
|
||||
@ -552,7 +552,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
|
||||
// Collect up flags to link in needed libraries.
|
||||
std::string linkLibs;
|
||||
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY)
|
||||
{
|
||||
this->CreateLinkLibs(linkLibs, relink, useResponseFileForLibs, depends,
|
||||
useWatcomQuote);
|
||||
@ -566,7 +566,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
useWatcomQuote);
|
||||
|
||||
// maybe create .def file from list of objects
|
||||
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if(this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -667,7 +667,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||
|
||||
// Compute the directory portion of the install_name setting.
|
||||
std::string install_name_dir;
|
||||
if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
// Get the install_name directory for the build tree.
|
||||
install_name_dir =
|
||||
|
@ -68,16 +68,16 @@ cmMakefileTargetGenerator::New(cmGeneratorTarget *tgt)
|
||||
|
||||
switch (tgt->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
result = new cmMakefileExecutableTargetGenerator(tgt);
|
||||
break;
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
result = new cmMakefileLibraryTargetGenerator(tgt);
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
result = new cmMakefileUtilityTargetGenerator(tgt);
|
||||
break;
|
||||
default:
|
||||
@ -543,10 +543,10 @@ cmMakefileTargetGenerator
|
||||
std::string targetFullPathReal;
|
||||
std::string targetFullPathPDB;
|
||||
std::string targetFullPathCompilePDB;
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE ||
|
||||
this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
targetFullPathReal =
|
||||
this->GeneratorTarget->GetFullPath(this->ConfigName, false, true);
|
||||
@ -555,7 +555,7 @@ cmMakefileTargetGenerator
|
||||
targetFullPathPDB += "/";
|
||||
targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName);
|
||||
}
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
targetFullPathCompilePDB =
|
||||
this->GeneratorTarget->GetCompilePDBPath(this->ConfigName);
|
||||
@ -1447,7 +1447,7 @@ void cmMakefileTargetGenerator
|
||||
::AppendTargetDepends(std::vector<std::string>& depends)
|
||||
{
|
||||
// Static libraries never depend on anything for linking.
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
|
||||
, TargetLinkLanguage("")
|
||||
{
|
||||
this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
|
||||
if (target->GetType() == cmTarget::EXECUTABLE)
|
||||
if (target->GetType() == cmState::EXECUTABLE)
|
||||
this->GetGeneratorTarget()->GetExecutableNames(this->TargetNameOut,
|
||||
this->TargetNameReal,
|
||||
this->TargetNameImport,
|
||||
@ -55,7 +55,7 @@ cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
|
||||
this->TargetNamePDB,
|
||||
GetLocalGenerator()->GetConfigName());
|
||||
|
||||
if(target->GetType() != cmTarget::OBJECT_LIBRARY)
|
||||
if(target->GetType() != cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
// on Windows the output dir is already needed at compile time
|
||||
// ensure the directory exists (OutDir test)
|
||||
@ -87,7 +87,7 @@ void cmNinjaNormalTargetGenerator::Generate()
|
||||
// Write the build statements
|
||||
this->WriteObjectBuildStatements();
|
||||
|
||||
if(this->GetTarget()->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GetGeneratorTarget()->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
this->WriteObjectLibStatement();
|
||||
}
|
||||
@ -103,7 +103,7 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules()
|
||||
cmGlobalNinjaGenerator::WriteDivider(this->GetRulesFileStream());
|
||||
this->GetRulesFileStream()
|
||||
<< "# Rules for each languages for "
|
||||
<< cmTarget::GetTargetTypeName(this->GetTarget()->GetType())
|
||||
<< cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
|
||||
<< " target "
|
||||
<< this->GetTargetName()
|
||||
<< "\n\n";
|
||||
@ -133,17 +133,17 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules()
|
||||
|
||||
const char *cmNinjaNormalTargetGenerator::GetVisibleTypeName() const
|
||||
{
|
||||
switch (this->GetTarget()->GetType()) {
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
switch (this->GetGeneratorTarget()->GetType()) {
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "static library";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return "shared library";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (this->GetTarget()->IsCFBundleOnApple())
|
||||
return "CFBundle shared module";
|
||||
else
|
||||
return "shared module";
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return "executable";
|
||||
default:
|
||||
return 0;
|
||||
@ -156,7 +156,7 @@ cmNinjaNormalTargetGenerator
|
||||
{
|
||||
return this->TargetLinkLanguage
|
||||
+ "_"
|
||||
+ cmTarget::GetTargetTypeName(this->GetTarget()->GetType())
|
||||
+ cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
|
||||
+ "_LINKER__"
|
||||
+ cmGlobalNinjaGenerator::EncodeRuleName(this->GetTarget()->GetName())
|
||||
;
|
||||
@ -166,7 +166,8 @@ void
|
||||
cmNinjaNormalTargetGenerator
|
||||
::WriteLinkRule(bool useResponseFile)
|
||||
{
|
||||
cmTarget::TargetType targetType = this->GetTarget()->GetType();
|
||||
cmState::TargetType targetType =
|
||||
this->GetGeneratorTarget()->GetType();
|
||||
std::string ruleName = this->LanguageLinkerRule();
|
||||
|
||||
// Select whether to use a response file for objects.
|
||||
@ -240,7 +241,7 @@ cmNinjaNormalTargetGenerator
|
||||
vars.Manifests = "$MANIFESTS";
|
||||
|
||||
std::string langFlags;
|
||||
if (targetType != cmTarget::EXECUTABLE)
|
||||
if (targetType != cmState::EXECUTABLE)
|
||||
{
|
||||
langFlags += "$LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS";
|
||||
vars.LanguageCompileFlags = langFlags.c_str();
|
||||
@ -283,7 +284,7 @@ cmNinjaNormalTargetGenerator
|
||||
std::string cmakeCommand =
|
||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||
cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
|
||||
if (targetType == cmTarget::EXECUTABLE)
|
||||
if (targetType == cmState::EXECUTABLE)
|
||||
this->GetGlobalGenerator()->AddRule("CMAKE_SYMLINK_EXECUTABLE",
|
||||
cmakeCommand +
|
||||
" -E cmake_symlink_executable"
|
||||
@ -330,8 +331,8 @@ cmNinjaNormalTargetGenerator
|
||||
return linkCmds;
|
||||
}
|
||||
}
|
||||
switch (this->GetTarget()->GetType()) {
|
||||
case cmTarget::STATIC_LIBRARY: {
|
||||
switch (this->GetGeneratorTarget()->GetType()) {
|
||||
case cmState::STATIC_LIBRARY: {
|
||||
// We have archive link commands set. First, delete the existing archive.
|
||||
{
|
||||
std::string cmakeCommand =
|
||||
@ -356,9 +357,9 @@ cmNinjaNormalTargetGenerator
|
||||
}
|
||||
return linkCmds;
|
||||
}
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
break;
|
||||
default:
|
||||
assert(0 && "Unexpected target type");
|
||||
@ -441,10 +442,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
|
||||
// Write comments.
|
||||
cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream());
|
||||
const cmTarget::TargetType targetType = target.GetType();
|
||||
const cmState::TargetType targetType = target.GetType();
|
||||
this->GetBuildFileStream()
|
||||
<< "# Link build statements for "
|
||||
<< cmTarget::GetTargetTypeName(targetType)
|
||||
<< cmState::GetTargetTypeName(targetType)
|
||||
<< " target "
|
||||
<< this->GetTargetName()
|
||||
<< "\n\n";
|
||||
@ -488,7 +489,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
&genTarget,
|
||||
useWatcomQuote);
|
||||
if(this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")
|
||||
&& target.GetType() == cmTarget::SHARED_LIBRARY)
|
||||
&& target.GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
@ -516,7 +517,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
// Compute architecture specific link flags. Yes, these go into a different
|
||||
// variable for executables, probably due to a mistake made when duplicating
|
||||
// code between the Makefile executable and library generators.
|
||||
if (targetType == cmTarget::EXECUTABLE)
|
||||
if (targetType == cmState::EXECUTABLE)
|
||||
{
|
||||
std::string t = vars["FLAGS"];
|
||||
localGen.AddArchitectureFlags(t, &genTarget, TargetLinkLanguage, cfgName);
|
||||
@ -536,7 +537,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
{
|
||||
vars["SONAME_FLAG"] = mf->GetSONameFlag(this->TargetLinkLanguage);
|
||||
vars["SONAME"] = this->TargetNameSO;
|
||||
if (targetType == cmTarget::SHARED_LIBRARY)
|
||||
if (targetType == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
std::string install_dir =
|
||||
this->GetGeneratorTarget()->GetInstallNameDirForBuildTree(cfgName);
|
||||
@ -624,7 +625,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
}
|
||||
|
||||
// maybe create .def file from list of objects
|
||||
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (target.GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -732,7 +733,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
|
||||
if (targetOutput != targetOutputReal && !target.IsFrameworkOnApple())
|
||||
{
|
||||
if (targetType == cmTarget::EXECUTABLE)
|
||||
if (targetType == cmState::EXECUTABLE)
|
||||
{
|
||||
globalGen.WriteBuild(this->GetBuildFileStream(),
|
||||
"Create executable symlink " + targetOutput,
|
||||
|
@ -31,17 +31,17 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
|
||||
{
|
||||
switch (target->GetType())
|
||||
{
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmState::EXECUTABLE:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
return new cmNinjaNormalTargetGenerator(target);
|
||||
|
||||
case cmTarget::UTILITY:
|
||||
case cmState::UTILITY:
|
||||
return new cmNinjaUtilityTargetGenerator(target);;
|
||||
|
||||
case cmTarget::GLOBAL_TARGET: {
|
||||
case cmState::GLOBAL_TARGET: {
|
||||
// We only want to process global targets that live in the home
|
||||
// (i.e. top-level) directory. CMake creates copies of these targets
|
||||
// in every directory, which we don't need.
|
||||
@ -189,8 +189,8 @@ ComputeDefines(cmSourceFile const* source, const std::string& language)
|
||||
cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps() const
|
||||
{
|
||||
// Static libraries never depend on other targets for linking.
|
||||
if (this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::OBJECT_LIBRARY)
|
||||
return cmNinjaDeps();
|
||||
|
||||
cmComputeLinkInformation* cli =
|
||||
@ -283,16 +283,16 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
|
||||
{
|
||||
std::string pdbPath;
|
||||
std::string compilePdbPath;
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE ||
|
||||
this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName());
|
||||
pdbPath += "/";
|
||||
pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
|
||||
}
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
compilePdbPath =
|
||||
this->GeneratorTarget->GetCompilePDBPath(this->GetConfigName());
|
||||
@ -480,7 +480,7 @@ cmNinjaTargetGenerator
|
||||
cmGlobalNinjaGenerator::WriteDivider(this->GetBuildFileStream());
|
||||
this->GetBuildFileStream()
|
||||
<< "# Object build statements for "
|
||||
<< cmTarget::GetTargetTypeName(this->GetTarget()->GetType())
|
||||
<< cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
|
||||
<< " target "
|
||||
<< this->GetTargetName()
|
||||
<< "\n\n";
|
||||
|
@ -123,4 +123,10 @@ static thisClass* SafeDownCast(cmObject *c) \
|
||||
} \
|
||||
class cmTypeMacro_UseTrailingSemicolon
|
||||
|
||||
enum cmTargetLinkLibraryType {
|
||||
GENERAL_LibraryType,
|
||||
DEBUG_LibraryType,
|
||||
OPTIMIZED_LibraryType
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -101,6 +101,33 @@ cmState::~cmState()
|
||||
cmDeleteAll(this->Commands);
|
||||
}
|
||||
|
||||
const char* cmState::GetTargetTypeName(cmState::TargetType targetType)
|
||||
{
|
||||
switch( targetType )
|
||||
{
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "STATIC_LIBRARY";
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return "MODULE_LIBRARY";
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return "SHARED_LIBRARY";
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
return "OBJECT_LIBRARY";
|
||||
case cmState::EXECUTABLE:
|
||||
return "EXECUTABLE";
|
||||
case cmState::UTILITY:
|
||||
return "UTILITY";
|
||||
case cmState::GLOBAL_TARGET:
|
||||
return "GLOBAL_TARGET";
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
return "INTERFACE_LIBRARY";
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
return "UNKNOWN_LIBRARY";
|
||||
}
|
||||
assert(0 && "Unexpected target type");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* cmCacheEntryTypes[] =
|
||||
{ "BOOL",
|
||||
"PATH",
|
||||
|
@ -181,6 +181,14 @@ public:
|
||||
friend class Snapshot;
|
||||
};
|
||||
|
||||
enum TargetType { EXECUTABLE, STATIC_LIBRARY,
|
||||
SHARED_LIBRARY, MODULE_LIBRARY,
|
||||
OBJECT_LIBRARY, UTILITY, GLOBAL_TARGET,
|
||||
INTERFACE_LIBRARY,
|
||||
UNKNOWN_LIBRARY};
|
||||
|
||||
static const char* GetTargetTypeName(cmState::TargetType targetType);
|
||||
|
||||
Snapshot CreateBaseSnapshot();
|
||||
Snapshot
|
||||
CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
|
||||
|
@ -33,53 +33,10 @@
|
||||
#define UNORDERED_SET std::set
|
||||
#endif
|
||||
|
||||
const char* cmTarget::GetTargetTypeName(TargetType targetType)
|
||||
{
|
||||
switch( targetType )
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
return "STATIC_LIBRARY";
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
return "MODULE_LIBRARY";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
return "SHARED_LIBRARY";
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
return "OBJECT_LIBRARY";
|
||||
case cmTarget::EXECUTABLE:
|
||||
return "EXECUTABLE";
|
||||
case cmTarget::UTILITY:
|
||||
return "UTILITY";
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
return "GLOBAL_TARGET";
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
return "INTERFACE_LIBRARY";
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
return "UNKNOWN_LIBRARY";
|
||||
}
|
||||
assert(0 && "Unexpected target type");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class cmTargetInternals
|
||||
{
|
||||
public:
|
||||
cmTargetInternals()
|
||||
: Backtrace()
|
||||
{
|
||||
}
|
||||
cmTargetInternals(cmTargetInternals const&)
|
||||
: Backtrace()
|
||||
{
|
||||
}
|
||||
~cmTargetInternals();
|
||||
|
||||
// The backtrace when the target was created.
|
||||
cmListFileBacktrace Backtrace;
|
||||
|
||||
typedef std::map<std::string, cmTarget::ImportInfo> ImportInfoMapType;
|
||||
ImportInfoMapType ImportInfoMap;
|
||||
|
||||
std::vector<std::string> IncludeDirectoriesEntries;
|
||||
std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
|
||||
std::vector<std::string> CompileOptionsEntries;
|
||||
@ -94,11 +51,6 @@ public:
|
||||
std::vector<cmListFileBacktrace> LinkImplementationPropertyBacktraces;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmTargetInternals::~cmTargetInternals()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmTarget::cmTarget()
|
||||
{
|
||||
@ -114,13 +66,13 @@ cmTarget::cmTarget()
|
||||
this->BuildInterfaceIncludesAppended = false;
|
||||
}
|
||||
|
||||
void cmTarget::SetType(TargetType type, const std::string& name)
|
||||
void cmTarget::SetType(cmState::TargetType type, const std::string& name)
|
||||
{
|
||||
this->Name = name;
|
||||
// only add dependency information for library targets
|
||||
this->TargetTypeValue = type;
|
||||
if(this->TargetTypeValue >= STATIC_LIBRARY
|
||||
&& this->TargetTypeValue <= MODULE_LIBRARY)
|
||||
if(this->TargetTypeValue >= cmState::STATIC_LIBRARY
|
||||
&& this->TargetTypeValue <= cmState::MODULE_LIBRARY)
|
||||
{
|
||||
this->RecordDependencies = true;
|
||||
}
|
||||
@ -150,7 +102,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
this->IsApple = this->Makefile->IsOn("APPLE");
|
||||
|
||||
// Setup default property values.
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& this->GetType() != cmState::UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("ANDROID_API", 0);
|
||||
this->SetPropertyDefault("ANDROID_API_MIN", 0);
|
||||
@ -213,7 +166,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
mf->GetConfigurations(configNames);
|
||||
|
||||
// Setup per-configuration property default values.
|
||||
if (this->GetType() != UTILITY)
|
||||
if (this->GetType() != cmState::UTILITY)
|
||||
{
|
||||
const char* configProps[] = {
|
||||
"ARCHIVE_OUTPUT_DIRECTORY_",
|
||||
@ -229,7 +182,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
std::string configUpper = cmSystemTools::UpperCase(*ci);
|
||||
for(const char** p = configProps; *p; ++p)
|
||||
{
|
||||
if (this->TargetTypeValue == INTERFACE_LIBRARY
|
||||
if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY
|
||||
&& strcmp(*p, "MAP_IMPORTED_CONFIG_") != 0)
|
||||
{
|
||||
continue;
|
||||
@ -244,8 +197,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
// compatibility with previous CMake versions in which executables
|
||||
// did not support this variable. Projects may still specify the
|
||||
// property directly.
|
||||
if(this->TargetTypeValue != cmTarget::EXECUTABLE
|
||||
&& this->TargetTypeValue != cmTarget::INTERFACE_LIBRARY)
|
||||
if(this->TargetTypeValue != cmState::EXECUTABLE
|
||||
&& this->TargetTypeValue != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
std::string property = cmSystemTools::UpperCase(*ci);
|
||||
property += "_POSTFIX";
|
||||
@ -255,7 +208,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
}
|
||||
|
||||
// Save the backtrace of target construction.
|
||||
this->Internal->Backtrace = this->Makefile->GetBacktrace();
|
||||
this->Backtrace = this->Makefile->GetBacktrace();
|
||||
|
||||
if (!this->IsImported())
|
||||
{
|
||||
@ -292,30 +245,32 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
parentOptionsBts.begin(), parentOptionsBts.end());
|
||||
}
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& this->GetType() != cmState::UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("C_VISIBILITY_PRESET", 0);
|
||||
this->SetPropertyDefault("CXX_VISIBILITY_PRESET", 0);
|
||||
this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", 0);
|
||||
}
|
||||
|
||||
if(this->TargetTypeValue == cmTarget::EXECUTABLE)
|
||||
if(this->TargetTypeValue == cmState::EXECUTABLE)
|
||||
{
|
||||
this->SetPropertyDefault("ANDROID_GUI", 0);
|
||||
this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", 0);
|
||||
this->SetPropertyDefault("ENABLE_EXPORTS", 0);
|
||||
}
|
||||
if(this->TargetTypeValue == cmTarget::SHARED_LIBRARY
|
||||
|| this->TargetTypeValue == cmTarget::MODULE_LIBRARY)
|
||||
if(this->TargetTypeValue == cmState::SHARED_LIBRARY
|
||||
|| this->TargetTypeValue == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
|
||||
}
|
||||
if(this->TargetTypeValue == cmTarget::SHARED_LIBRARY)
|
||||
if(this->TargetTypeValue == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", 0);
|
||||
}
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& this->GetType() != cmState::UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", 0);
|
||||
}
|
||||
@ -323,15 +278,16 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
||||
// Record current policies for later use.
|
||||
this->Makefile->RecordPolicies(this->PolicyMap);
|
||||
|
||||
if (this->TargetTypeValue == INTERFACE_LIBRARY)
|
||||
if (this->TargetTypeValue == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
// This policy is checked in a few conditions. The properties relevant
|
||||
// to the policy are always ignored for INTERFACE_LIBRARY targets,
|
||||
// to the policy are always ignored for cmState::INTERFACE_LIBRARY targets,
|
||||
// so ensure that the conditions don't lead to nonsense.
|
||||
this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
|
||||
}
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY
|
||||
&& this->GetType() != cmState::UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("JOB_POOL_COMPILE", 0);
|
||||
this->SetPropertyDefault("JOB_POOL_LINK", 0);
|
||||
@ -378,24 +334,24 @@ void cmTarget::FinishConfigure()
|
||||
//----------------------------------------------------------------------------
|
||||
cmListFileBacktrace const& cmTarget::GetBacktrace() const
|
||||
{
|
||||
return this->Internal->Backtrace;
|
||||
return this->Backtrace;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsExecutableWithExports() const
|
||||
{
|
||||
return (this->GetType() == cmTarget::EXECUTABLE &&
|
||||
return (this->GetType() == cmState::EXECUTABLE &&
|
||||
this->GetPropertyAsBool("ENABLE_EXPORTS"));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsLinkable() const
|
||||
{
|
||||
return (this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->GetType() == cmTarget::UNKNOWN_LIBRARY ||
|
||||
this->GetType() == cmTarget::INTERFACE_LIBRARY ||
|
||||
return (this->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->GetType() == cmState::UNKNOWN_LIBRARY ||
|
||||
this->GetType() == cmState::INTERFACE_LIBRARY ||
|
||||
this->IsExecutableWithExports());
|
||||
}
|
||||
|
||||
@ -403,14 +359,14 @@ bool cmTarget::IsLinkable() const
|
||||
bool cmTarget::HasImportLibrary() const
|
||||
{
|
||||
return (this->DLLPlatform &&
|
||||
(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->IsExecutableWithExports()));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsFrameworkOnApple() const
|
||||
{
|
||||
return (this->GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
return (this->GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("APPLE") &&
|
||||
this->GetPropertyAsBool("FRAMEWORK"));
|
||||
}
|
||||
@ -418,7 +374,7 @@ bool cmTarget::IsFrameworkOnApple() const
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsAppBundleOnApple() const
|
||||
{
|
||||
return (this->GetType() == cmTarget::EXECUTABLE &&
|
||||
return (this->GetType() == cmState::EXECUTABLE &&
|
||||
this->Makefile->IsOn("APPLE") &&
|
||||
this->GetPropertyAsBool("MACOSX_BUNDLE"));
|
||||
}
|
||||
@ -426,7 +382,7 @@ bool cmTarget::IsAppBundleOnApple() const
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsCFBundleOnApple() const
|
||||
{
|
||||
return (this->GetType() == cmTarget::MODULE_LIBRARY &&
|
||||
return (this->GetType() == cmState::MODULE_LIBRARY &&
|
||||
this->Makefile->IsOn("APPLE") &&
|
||||
this->GetPropertyAsBool("BUNDLE"));
|
||||
}
|
||||
@ -653,13 +609,13 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories() const
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
|
||||
cmTargetLinkLibraryType cmTarget::ComputeLinkType(
|
||||
const std::string& config) const
|
||||
{
|
||||
// No configuration is always optimized.
|
||||
if(config.empty())
|
||||
{
|
||||
return cmTarget::OPTIMIZED;
|
||||
return OPTIMIZED_LibraryType;
|
||||
}
|
||||
|
||||
// Get the list of configurations considered to be DEBUG.
|
||||
@ -671,10 +627,10 @@ cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
|
||||
if (std::find(debugConfigs.begin(), debugConfigs.end(), configUpper) !=
|
||||
debugConfigs.end())
|
||||
{
|
||||
return cmTarget::DEBUG;
|
||||
return DEBUG_LibraryType;
|
||||
}
|
||||
// The current configuration is not a debug configuration.
|
||||
return cmTarget::OPTIMIZED;
|
||||
return OPTIMIZED_LibraryType;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -714,9 +670,9 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value,
|
||||
cmTarget::LinkLibraryType llt) const
|
||||
cmTargetLinkLibraryType llt) const
|
||||
{
|
||||
if (llt == GENERAL)
|
||||
if (llt == GENERAL_LibraryType)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
@ -737,7 +693,7 @@ std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value,
|
||||
configString = "$<OR:" + configString + ">";
|
||||
}
|
||||
|
||||
if (llt == OPTIMIZED)
|
||||
if (llt == OPTIMIZED_LibraryType)
|
||||
{
|
||||
configString = "$<NOT:" + configString + ">";
|
||||
}
|
||||
@ -794,13 +750,14 @@ void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
|
||||
void cmTarget::AddLinkLibrary(cmMakefile& mf,
|
||||
const std::string& target,
|
||||
const std::string& lib,
|
||||
LinkLibraryType llt)
|
||||
cmTargetLinkLibraryType llt)
|
||||
{
|
||||
cmTarget *tgt = this->Makefile->FindTargetToUse(lib);
|
||||
{
|
||||
const bool isNonImportedTarget = tgt && !tgt->IsImported();
|
||||
|
||||
const std::string libName = (isNonImportedTarget && llt != GENERAL)
|
||||
const std::string libName =
|
||||
(isNonImportedTarget && llt != GENERAL_LibraryType)
|
||||
? targetNameGenex(lib)
|
||||
: lib;
|
||||
this->AppendProperty("LINK_LIBRARIES",
|
||||
@ -809,7 +766,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
|
||||
}
|
||||
|
||||
if (cmGeneratorExpression::Find(lib) != std::string::npos
|
||||
|| (tgt && tgt->GetType() == INTERFACE_LIBRARY)
|
||||
|| (tgt && tgt->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
|| (target == lib ))
|
||||
{
|
||||
return;
|
||||
@ -843,13 +800,13 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
|
||||
}
|
||||
switch (llt)
|
||||
{
|
||||
case cmTarget::GENERAL:
|
||||
case GENERAL_LibraryType:
|
||||
dependencies += "general";
|
||||
break;
|
||||
case cmTarget::DEBUG:
|
||||
case DEBUG_LibraryType:
|
||||
dependencies += "debug";
|
||||
break;
|
||||
case cmTarget::OPTIMIZED:
|
||||
case OPTIMIZED_LibraryType:
|
||||
dependencies += "optimized";
|
||||
break;
|
||||
}
|
||||
@ -1183,7 +1140,7 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf,
|
||||
|
||||
// Parse the dependency information, which is a set of
|
||||
// type, library pairs separated by ";". There is always a trailing ";".
|
||||
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
|
||||
cmTargetLinkLibraryType llt = GENERAL_LibraryType;
|
||||
std::string depline = deps;
|
||||
std::string::size_type start = 0;
|
||||
std::string::size_type end;
|
||||
@ -1195,22 +1152,22 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf,
|
||||
{
|
||||
if (l == "debug")
|
||||
{
|
||||
llt = cmTarget::DEBUG;
|
||||
llt = DEBUG_LibraryType;
|
||||
}
|
||||
else if (l == "optimized")
|
||||
{
|
||||
llt = cmTarget::OPTIMIZED;
|
||||
llt = OPTIMIZED_LibraryType;
|
||||
}
|
||||
else if (l == "general")
|
||||
{
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryID lib2(l,llt);
|
||||
this->InsertDependencyForVS6( dep_map, lib, lib2);
|
||||
this->GatherDependenciesForVS6( mf, lib2, dep_map);
|
||||
llt = cmTarget::GENERAL;
|
||||
llt = GENERAL_LibraryType;
|
||||
}
|
||||
}
|
||||
start = end+1; // skip the ;
|
||||
@ -1258,7 +1215,7 @@ static bool whiteListedInterfaceProperty(const std::string& prop)
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::SetProperty(const std::string& prop, const char* value)
|
||||
{
|
||||
if (this->GetType() == INTERFACE_LIBRARY
|
||||
if (this->GetType() == cmState::INTERFACE_LIBRARY
|
||||
&& !whiteListedInterfaceProperty(prop))
|
||||
{
|
||||
std::ostringstream e;
|
||||
@ -1367,7 +1324,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
|
||||
void cmTarget::AppendProperty(const std::string& prop, const char* value,
|
||||
bool asString)
|
||||
{
|
||||
if (this->GetType() == INTERFACE_LIBRARY
|
||||
if (this->GetType() == cmState::INTERFACE_LIBRARY
|
||||
&& !whiteListedInterfaceProperty(prop))
|
||||
{
|
||||
std::ostringstream e;
|
||||
@ -1479,10 +1436,10 @@ std::string cmTarget::GetExportName() const
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::AppendBuildInterfaceIncludes()
|
||||
{
|
||||
if(this->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
this->GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
this->GetType() != cmTarget::MODULE_LIBRARY &&
|
||||
this->GetType() != cmTarget::INTERFACE_LIBRARY &&
|
||||
if(this->GetType() != cmState::SHARED_LIBRARY &&
|
||||
this->GetType() != cmState::STATIC_LIBRARY &&
|
||||
this->GetType() != cmState::MODULE_LIBRARY &&
|
||||
this->GetType() != cmState::INTERFACE_LIBRARY &&
|
||||
!this->IsExecutableWithExports())
|
||||
{
|
||||
return;
|
||||
@ -1556,7 +1513,7 @@ void cmTarget::MaybeInvalidatePropertyCache(const std::string& prop)
|
||||
// Wipe out maps caching information affected by this property.
|
||||
if(this->IsImported() && cmHasLiteralPrefix(prop, "IMPORTED"))
|
||||
{
|
||||
this->Internal->ImportInfoMap.clear();
|
||||
this->ImportInfoMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1664,10 +1621,10 @@ void cmTarget::MarkAsImported()
|
||||
bool cmTarget::HaveWellDefinedOutputFiles() const
|
||||
{
|
||||
return
|
||||
this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->GetType() == cmTarget::EXECUTABLE;
|
||||
this->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->GetType() == cmState::EXECUTABLE;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -1695,7 +1652,7 @@ void cmTarget::GetTargetVersion(bool soversion,
|
||||
minor = 0;
|
||||
patch = 0;
|
||||
|
||||
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||
assert(this->GetType() != cmState::INTERFACE_LIBRARY);
|
||||
|
||||
// Look for a VERSION or SOVERSION property.
|
||||
const char* prop = soversion? "SOVERSION" : "VERSION";
|
||||
@ -1763,7 +1720,7 @@ const char *cmTarget::GetProperty(const std::string& prop) const
|
||||
const char *cmTarget::GetProperty(const std::string& prop,
|
||||
cmMakefile* context) const
|
||||
{
|
||||
if (this->GetType() == INTERFACE_LIBRARY
|
||||
if (this->GetType() == cmState::INTERFACE_LIBRARY
|
||||
&& !whiteListedInterfaceProperty(prop))
|
||||
{
|
||||
std::ostringstream e;
|
||||
@ -1775,11 +1732,11 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
||||
|
||||
// Watch for special "computed" properties that are dependent on
|
||||
// other properties or variables. Always recompute them.
|
||||
if(this->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
this->GetType() == cmTarget::UNKNOWN_LIBRARY)
|
||||
if(this->GetType() == cmState::EXECUTABLE ||
|
||||
this->GetType() == cmState::STATIC_LIBRARY ||
|
||||
this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->GetType() == cmState::UNKNOWN_LIBRARY)
|
||||
{
|
||||
static const std::string propLOCATION = "LOCATION";
|
||||
if(prop == propLOCATION)
|
||||
@ -1908,7 +1865,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
|
||||
// the type property returns what type the target is
|
||||
else if (prop == propTYPE)
|
||||
{
|
||||
return cmTarget::GetTargetTypeName(this->GetType());
|
||||
return cmState::GetTargetTypeName(this->GetType());
|
||||
}
|
||||
else if(prop == propINCLUDE_DIRECTORIES)
|
||||
{
|
||||
@ -2089,17 +2046,17 @@ const char* cmTarget::GetSuffixVariableInternal(bool implib) const
|
||||
{
|
||||
switch(this->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "CMAKE_STATIC_LIBRARY_SUFFIX";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_SUFFIX"
|
||||
: "CMAKE_SHARED_LIBRARY_SUFFIX");
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_SUFFIX"
|
||||
: "CMAKE_SHARED_MODULE_SUFFIX");
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_SUFFIX"
|
||||
// Android GUI application packages store the native
|
||||
@ -2118,17 +2075,17 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib) const
|
||||
{
|
||||
switch(this->GetType())
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
return "CMAKE_STATIC_LIBRARY_PREFIX";
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_PREFIX"
|
||||
: "CMAKE_SHARED_LIBRARY_PREFIX");
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_PREFIX"
|
||||
: "CMAKE_SHARED_MODULE_PREFIX");
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
return (implib
|
||||
? "CMAKE_IMPORT_LIBRARY_PREFIX"
|
||||
// Android GUI application packages store the native
|
||||
@ -2204,7 +2161,7 @@ void cmTarget::SetPropertyDefault(const std::string& property,
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmTarget::GetFrameworkVersion() const
|
||||
{
|
||||
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||
assert(this->GetType() != cmState::INTERFACE_LIBRARY);
|
||||
|
||||
if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
|
||||
{
|
||||
@ -2224,8 +2181,8 @@ std::string cmTarget::GetFrameworkVersion() const
|
||||
const char* cmTarget::GetExportMacro() const
|
||||
{
|
||||
// Define the symbol for targets that export symbols.
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY ||
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GetType() == cmState::MODULE_LIBRARY ||
|
||||
this->IsExecutableWithExports())
|
||||
{
|
||||
if(const char* custom_export_name = this->GetProperty("DEFINE_SYMBOL"))
|
||||
@ -2306,19 +2263,18 @@ cmTarget::GetImportInfo(const std::string& config) const
|
||||
{
|
||||
config_upper = "NOCONFIG";
|
||||
}
|
||||
typedef cmTargetInternals::ImportInfoMapType ImportInfoMapType;
|
||||
|
||||
ImportInfoMapType::const_iterator i =
|
||||
this->Internal->ImportInfoMap.find(config_upper);
|
||||
if(i == this->Internal->ImportInfoMap.end())
|
||||
this->ImportInfoMap.find(config_upper);
|
||||
if(i == this->ImportInfoMap.end())
|
||||
{
|
||||
ImportInfo info;
|
||||
this->ComputeImportInfo(config_upper, info);
|
||||
ImportInfoMapType::value_type entry(config_upper, info);
|
||||
i = this->Internal->ImportInfoMap.insert(entry).first;
|
||||
i = this->ImportInfoMap.insert(entry).first;
|
||||
}
|
||||
|
||||
if(this->GetType() == INTERFACE_LIBRARY)
|
||||
if(this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return &i->second;
|
||||
}
|
||||
@ -2338,10 +2294,10 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config,
|
||||
const char** imp,
|
||||
std::string& suffix) const
|
||||
{
|
||||
if (this->GetType() == INTERFACE_LIBRARY)
|
||||
if (this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
// This method attempts to find a config-specific LOCATION for the
|
||||
// IMPORTED library. In the case of INTERFACE_LIBRARY, there is no
|
||||
// IMPORTED library. In the case of cmState::INTERFACE_LIBRARY, there is no
|
||||
// LOCATION at all, so leaving *loc and *imp unchanged is the appropriate
|
||||
// and valid response.
|
||||
return true;
|
||||
@ -2488,7 +2444,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
std::string linkProp = "INTERFACE_LINK_LIBRARIES";
|
||||
const char *propertyLibs = this->GetProperty(linkProp);
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY)
|
||||
if (this->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
if(!propertyLibs)
|
||||
{
|
||||
@ -2509,7 +2465,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
info.Libraries = propertyLibs;
|
||||
}
|
||||
}
|
||||
if(this->GetType() == INTERFACE_LIBRARY)
|
||||
if(this->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2537,7 +2493,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
}
|
||||
|
||||
// Get the soname.
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
std::string soProp = "IMPORTED_SONAME";
|
||||
soProp += suffix;
|
||||
@ -2552,7 +2508,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
}
|
||||
|
||||
// Get the "no-soname" mark.
|
||||
if(this->GetType() == cmTarget::SHARED_LIBRARY)
|
||||
if(this->GetType() == cmState::SHARED_LIBRARY)
|
||||
{
|
||||
std::string soProp = "IMPORTED_NO_SONAME";
|
||||
soProp += suffix;
|
||||
@ -2571,7 +2527,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
{
|
||||
info.ImportLibrary = imp;
|
||||
}
|
||||
else if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
else if(this->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->IsExecutableWithExports())
|
||||
{
|
||||
std::string impProp = "IMPORTED_IMPLIB";
|
||||
@ -2618,7 +2574,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
|
||||
}
|
||||
|
||||
// Get the cyclic repetition count.
|
||||
if(this->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if(this->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
std::string linkProp = "IMPORTED_LINK_INTERFACE_MULTIPLICITY";
|
||||
linkProp += suffix;
|
||||
|
@ -77,18 +77,12 @@ class cmTarget
|
||||
{
|
||||
public:
|
||||
cmTarget();
|
||||
enum TargetType { EXECUTABLE, STATIC_LIBRARY,
|
||||
SHARED_LIBRARY, MODULE_LIBRARY,
|
||||
OBJECT_LIBRARY, UTILITY, GLOBAL_TARGET,
|
||||
INTERFACE_LIBRARY,
|
||||
UNKNOWN_LIBRARY};
|
||||
static const char* GetTargetTypeName(TargetType targetType);
|
||||
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
|
||||
|
||||
/**
|
||||
* Return the type of target.
|
||||
*/
|
||||
TargetType GetType() const
|
||||
cmState::TargetType GetType() const
|
||||
{
|
||||
return this->TargetTypeValue;
|
||||
}
|
||||
@ -96,7 +90,7 @@ public:
|
||||
/**
|
||||
* Set the target type
|
||||
*/
|
||||
void SetType(TargetType f, const std::string& name);
|
||||
void SetType(cmState::TargetType f, const std::string& name);
|
||||
|
||||
void MarkAsImported();
|
||||
|
||||
@ -140,17 +134,15 @@ public:
|
||||
cmSourceFile* AddSourceCMP0049(const std::string& src);
|
||||
cmSourceFile* AddSource(const std::string& src);
|
||||
|
||||
enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
|
||||
|
||||
//* how we identify a library, by name and type
|
||||
typedef std::pair<std::string, LinkLibraryType> LibraryID;
|
||||
typedef std::pair<std::string, cmTargetLinkLibraryType> LibraryID;
|
||||
|
||||
typedef std::vector<LibraryID > LinkLibraryVectorType;
|
||||
const LinkLibraryVectorType &GetOriginalLinkLibraries() const
|
||||
{return this->OriginalLinkLibraries;}
|
||||
|
||||
/** Compute the link type to use for the given configuration. */
|
||||
LinkLibraryType ComputeLinkType(const std::string& config) const;
|
||||
cmTargetLinkLibraryType ComputeLinkType(const std::string& config) const;
|
||||
|
||||
/**
|
||||
* Clear the dependency information recorded for this target, if any.
|
||||
@ -161,7 +153,7 @@ public:
|
||||
bool NameResolvesToFramework(const std::string& libname) const;
|
||||
void AddLinkLibrary(cmMakefile& mf,
|
||||
const std::string& target, const std::string& lib,
|
||||
LinkLibraryType llt);
|
||||
cmTargetLinkLibraryType llt);
|
||||
enum TLLSignature {
|
||||
KeywordTLLSignature,
|
||||
PlainTLLSignature
|
||||
@ -297,14 +289,14 @@ public:
|
||||
void AppendBuildInterfaceIncludes();
|
||||
|
||||
std::string GetDebugGeneratorExpressions(const std::string &value,
|
||||
cmTarget::LinkLibraryType llt) const;
|
||||
cmTargetLinkLibraryType llt) const;
|
||||
|
||||
void AddSystemIncludeDirectories(const std::set<std::string> &incs);
|
||||
std::set<std::string> const & GetSystemIncludeDirectories() const
|
||||
{ return this->SystemIncludeDirectories; }
|
||||
|
||||
bool LinkLanguagePropagatesToDependents() const
|
||||
{ return this->TargetTypeValue == STATIC_LIBRARY; }
|
||||
{ return this->TargetTypeValue == cmState::STATIC_LIBRARY; }
|
||||
|
||||
cmStringRange GetIncludeDirectoriesEntries() const;
|
||||
cmBacktraceRange GetIncludeDirectoriesBacktraces() const;
|
||||
@ -422,7 +414,7 @@ private:
|
||||
#endif
|
||||
cmMakefile* Makefile;
|
||||
cmTargetInternalPointer Internal;
|
||||
TargetType TargetTypeValue;
|
||||
cmState::TargetType TargetTypeValue;
|
||||
bool HaveInstallRule;
|
||||
bool RecordDependencies;
|
||||
bool DLLPlatform;
|
||||
@ -449,6 +441,9 @@ private:
|
||||
std::string SharedDeps;
|
||||
};
|
||||
|
||||
typedef std::map<std::string, ImportInfo> ImportInfoMapType;
|
||||
mutable ImportInfoMapType ImportInfoMap;
|
||||
|
||||
ImportInfo const* GetImportInfo(const std::string& config) const;
|
||||
void ComputeImportInfo(std::string const& desired_config,
|
||||
ImportInfo& info) const;
|
||||
@ -471,6 +466,8 @@ private:
|
||||
std::string const& suffix,
|
||||
std::string const& name,
|
||||
const char* version) const;
|
||||
|
||||
cmListFileBacktrace Backtrace;
|
||||
};
|
||||
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
|
@ -88,7 +88,7 @@ bool cmTargetLinkLibrariesCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if(this->Target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
if(this->Target->GetType() == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
e << "Object library target \"" << args[0] << "\" "
|
||||
@ -98,7 +98,7 @@ bool cmTargetLinkLibrariesCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->Target->GetType() == cmTarget::UTILITY)
|
||||
if (this->Target->GetType() == cmState::UTILITY)
|
||||
{
|
||||
std::ostringstream e;
|
||||
const char *modal = 0;
|
||||
@ -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,9 +350,9 @@ cmTargetLinkLibrariesCommand
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
cmTarget::LinkLibraryType llt)
|
||||
cmTargetLinkLibraryType llt)
|
||||
{
|
||||
if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if(this->Target->GetType() == cmState::INTERFACE_LIBRARY
|
||||
&& this->CurrentProcessingState != ProcessingKeywordLinkInterface)
|
||||
{
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
||||
@ -428,7 +428,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
else if(this->CurrentProcessingState != ProcessingKeywordPublicInterface
|
||||
&& this->CurrentProcessingState != ProcessingPlainPublicInterface)
|
||||
{
|
||||
if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||
if (this->Target->GetType() == cmState::STATIC_LIBRARY)
|
||||
{
|
||||
std::string configLib = this->Target
|
||||
->GetDebugGeneratorExpressions(lib, llt);
|
||||
@ -458,7 +458,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if (this->Target->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -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());
|
||||
|
@ -62,7 +62,7 @@ private:
|
||||
|
||||
ProcessingState CurrentProcessingState;
|
||||
|
||||
bool HandleLibrary(const std::string& lib, cmTarget::LinkLibraryType llt);
|
||||
bool HandleLibrary(const std::string& lib, cmTargetLinkLibraryType llt);
|
||||
};
|
||||
|
||||
|
||||
|
@ -44,12 +44,12 @@ bool cmTargetPropCommandBase
|
||||
this->HandleMissingTarget(args[0]);
|
||||
return false;
|
||||
}
|
||||
if ((this->Target->GetType() != cmTarget::SHARED_LIBRARY)
|
||||
&& (this->Target->GetType() != cmTarget::STATIC_LIBRARY)
|
||||
&& (this->Target->GetType() != cmTarget::OBJECT_LIBRARY)
|
||||
&& (this->Target->GetType() != cmTarget::MODULE_LIBRARY)
|
||||
&& (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
&& (this->Target->GetType() != cmTarget::EXECUTABLE))
|
||||
if ((this->Target->GetType() != cmState::SHARED_LIBRARY)
|
||||
&& (this->Target->GetType() != cmState::STATIC_LIBRARY)
|
||||
&& (this->Target->GetType() != cmState::OBJECT_LIBRARY)
|
||||
&& (this->Target->GetType() != cmState::MODULE_LIBRARY)
|
||||
&& (this->Target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
&& (this->Target->GetType() != cmState::EXECUTABLE))
|
||||
{
|
||||
this->SetError("called with non-compilable target type");
|
||||
return false;
|
||||
@ -114,7 +114,7 @@ bool cmTargetPropCommandBase
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if (this->Target->GetType() == cmState::INTERFACE_LIBRARY
|
||||
&& scope != "INTERFACE")
|
||||
{
|
||||
this->SetError("may only be set INTERFACE properties on INTERFACE "
|
||||
|
@ -90,7 +90,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||
std::string exe = command[0];
|
||||
cmGeneratorTarget* target =
|
||||
this->LG->FindGeneratorTargetToUse(exe);
|
||||
if(target && target->GetType() == cmTarget::EXECUTABLE)
|
||||
if(target && target->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
// Use the target file on disk.
|
||||
exe = target->GetFullPath(config);
|
||||
|
@ -269,7 +269,7 @@ void cmVisualStudio10TargetGenerator::WriteString(const char* line,
|
||||
void cmVisualStudio10TargetGenerator::Generate()
|
||||
{
|
||||
// do not generate external ms projects
|
||||
if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||
if(this->GeneratorTarget->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| this->Target->GetProperty("EXTERNAL_MSPROJECT"))
|
||||
{
|
||||
return;
|
||||
@ -278,7 +278,7 @@ void cmVisualStudio10TargetGenerator::Generate()
|
||||
this->Target->SetProperty("GENERATOR_FILE_NAME",this->Name.c_str());
|
||||
this->Target->SetProperty("GENERATOR_FILE_NAME_EXT",
|
||||
".vcxproj");
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
if(!this->ComputeClOptions())
|
||||
{
|
||||
@ -360,7 +360,8 @@ void cmVisualStudio10TargetGenerator::Generate()
|
||||
this->WriteString("<ProjectGUID>", 2);
|
||||
(*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
|
||||
|
||||
if(this->MSTools && this->Target->GetType() <= cmTarget::GLOBAL_TARGET)
|
||||
if(this->MSTools
|
||||
&& this->GeneratorTarget->GetType() <= cmState::GLOBAL_TARGET)
|
||||
{
|
||||
this->WriteApplicationTypeSettings();
|
||||
this->VerifyNecessaryFiles();
|
||||
@ -666,17 +667,17 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
|
||||
i->c_str(),
|
||||
1, " Label=\"Configuration\"", "\n");
|
||||
std::string configType = "<ConfigurationType>";
|
||||
switch(this->Target->GetType())
|
||||
switch(this->GeneratorTarget->GetType())
|
||||
{
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmState::SHARED_LIBRARY:
|
||||
case cmState::MODULE_LIBRARY:
|
||||
configType += "DynamicLibrary";
|
||||
break;
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::STATIC_LIBRARY:
|
||||
configType += "StaticLibrary";
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
case cmState::EXECUTABLE:
|
||||
if(this->NsightTegra &&
|
||||
!this->Target->GetPropertyAsBool("ANDROID_GUI"))
|
||||
{
|
||||
@ -688,8 +689,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
|
||||
configType += "Application";
|
||||
}
|
||||
break;
|
||||
case cmTarget::UTILITY:
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
case cmState::UTILITY:
|
||||
case cmState::GLOBAL_TARGET:
|
||||
if(this->NsightTegra)
|
||||
{
|
||||
// Tegra-Android platform does not understand "Utility".
|
||||
@ -700,8 +701,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
|
||||
configType += "Utility";
|
||||
}
|
||||
break;
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
case cmTarget::INTERFACE_LIBRARY:
|
||||
case cmState::UNKNOWN_LIBRARY:
|
||||
case cmState::INTERFACE_LIBRARY:
|
||||
break;
|
||||
}
|
||||
configType += "</ConfigurationType>\n";
|
||||
@ -743,7 +744,7 @@ void cmVisualStudio10TargetGenerator
|
||||
mfcLine += useOfMfcValue + "</UseOfMfc>\n";
|
||||
this->WriteString(mfcLine.c_str(), 2);
|
||||
|
||||
if((this->Target->GetType() <= cmTarget::OBJECT_LIBRARY &&
|
||||
if((this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY &&
|
||||
this->ClOptions[config]->UsingUnicode()) ||
|
||||
this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
|
||||
this->GlobalGenerator->TargetsWindowsPhone() ||
|
||||
@ -752,7 +753,7 @@ void cmVisualStudio10TargetGenerator
|
||||
{
|
||||
this->WriteString("<CharacterSet>Unicode</CharacterSet>\n", 2);
|
||||
}
|
||||
else if (this->Target->GetType() <= cmTarget::MODULE_LIBRARY &&
|
||||
else if (this->GeneratorTarget->GetType() <= cmState::MODULE_LIBRARY &&
|
||||
this->ClOptions[config]->UsingSBCS())
|
||||
{
|
||||
this->WriteString("<CharacterSet>NotSet</CharacterSet>\n", 2);
|
||||
@ -1480,7 +1481,7 @@ void cmVisualStudio10TargetGenerator::WriteSources(
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteAllSources()
|
||||
{
|
||||
if(this->Target->GetType() > cmTarget::UTILITY)
|
||||
if(this->GeneratorTarget->GetType() > cmState::UTILITY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1742,8 +1743,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
||||
{
|
||||
cmTarget::TargetType ttype = this->Target->GetType();
|
||||
if(ttype > cmTarget::GLOBAL_TARGET)
|
||||
cmState::TargetType ttype = this->GeneratorTarget->GetType();
|
||||
if(ttype > cmState::GLOBAL_TARGET)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1755,7 +1756,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
||||
config = this->Configurations.begin();
|
||||
config != this->Configurations.end(); ++config)
|
||||
{
|
||||
if(ttype >= cmTarget::UTILITY)
|
||||
if(ttype >= cmState::UTILITY)
|
||||
{
|
||||
this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
|
||||
*this->BuildFileStream
|
||||
@ -1771,7 +1772,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
||||
intermediateDir += "/";
|
||||
std::string outDir;
|
||||
std::string targetNameFull;
|
||||
if(ttype == cmTarget::OBJECT_LIBRARY)
|
||||
if(ttype == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
outDir = intermediateDir;
|
||||
targetNameFull = this->Target->GetName();
|
||||
@ -1827,8 +1828,8 @@ OutputLinkIncremental(std::string const& configName)
|
||||
}
|
||||
// static libraries and things greater than modules do not need
|
||||
// to set this option
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|| this->Target->GetType() > cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY
|
||||
|| this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1966,8 +1967,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
{
|
||||
clOptions.AddFlag("CompileAsWinRT", "true");
|
||||
// For WinRT components, add the _WINRT_DLL define to produce a lib
|
||||
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY )
|
||||
if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY )
|
||||
{
|
||||
clOptions.AddDefine("_WINRT_DLL");
|
||||
}
|
||||
@ -2175,8 +2176,8 @@ WriteMasmOptions(std::string const& configName,
|
||||
void
|
||||
cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
|
||||
{
|
||||
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY &&
|
||||
this->Target->GetType() != cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() != cmState::STATIC_LIBRARY &&
|
||||
this->GeneratorTarget->GetType() != cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2212,9 +2213,9 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config)
|
||||
void cmVisualStudio10TargetGenerator::WriteManifestOptions(
|
||||
std::string const& config)
|
||||
{
|
||||
if (this->Target->GetType() != cmTarget::EXECUTABLE &&
|
||||
this->Target->GetType() != cmTarget::SHARED_LIBRARY &&
|
||||
this->Target->GetType() != cmTarget::MODULE_LIBRARY)
|
||||
if (this->GeneratorTarget->GetType() != cmState::EXECUTABLE &&
|
||||
this->GeneratorTarget->GetType() != cmState::SHARED_LIBRARY &&
|
||||
this->GeneratorTarget->GetType() != cmState::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2380,9 +2381,9 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmVisualStudio10TargetGenerator::ComputeLinkOptions()
|
||||
{
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
|
||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE ||
|
||||
this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
for(std::vector<std::string>::const_iterator
|
||||
i = this->Configurations.begin();
|
||||
@ -2419,11 +2420,11 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
std::string CONFIG = cmSystemTools::UpperCase(config);
|
||||
|
||||
const char* linkType = "SHARED";
|
||||
if(this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
|
||||
{
|
||||
linkType = "MODULE";
|
||||
}
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
linkType = "EXE";
|
||||
}
|
||||
@ -2506,7 +2507,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
std::string targetNameFull;
|
||||
std::string targetNameImport;
|
||||
std::string targetNamePDB;
|
||||
if(this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if(this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
this->GeneratorTarget->GetExecutableNames(targetName, targetNameFull,
|
||||
targetNameImport, targetNamePDB,
|
||||
@ -2529,7 +2530,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
if (this->GlobalGenerator->TargetsWindowsCE())
|
||||
{
|
||||
linkOptions.AddFlag("SubSystem", "WindowsCE");
|
||||
if (this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
if (this->ClOptions[config]->UsingUnicode())
|
||||
{
|
||||
@ -2551,7 +2552,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
if (this->GlobalGenerator->TargetsWindowsCE())
|
||||
{
|
||||
linkOptions.AddFlag("SubSystem", "WindowsCE");
|
||||
if (this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
if (this->ClOptions[config]->UsingUnicode())
|
||||
{
|
||||
@ -2597,7 +2598,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
// A Windows Runtime component uses internal .NET metadata,
|
||||
// so does not have an import library.
|
||||
if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") &&
|
||||
this->Target->GetType() != cmTarget::EXECUTABLE)
|
||||
this->GeneratorTarget->GetType() != cmState::EXECUTABLE)
|
||||
{
|
||||
linkOptions.AddFlag("GenerateWindowsMetadata", "true");
|
||||
}
|
||||
@ -2635,7 +2636,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
"%(IgnoreSpecificDefaultLibraries)");
|
||||
}
|
||||
|
||||
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -2652,8 +2653,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||
void
|
||||
cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config)
|
||||
{
|
||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY
|
||||
|| this->Target->GetType() > cmTarget::MODULE_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY
|
||||
|| this->GeneratorTarget->GetType() > cmState::MODULE_LIBRARY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2691,7 +2692,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
|
||||
libVec.push_back(path);
|
||||
}
|
||||
else if (!l->Target
|
||||
|| l->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||
|| l->Target->GetType() != cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
libVec.push_back(l->Value);
|
||||
}
|
||||
@ -2763,7 +2764,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
|
||||
this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1);
|
||||
*this->BuildFileStream << "\n";
|
||||
// output cl compile flags <ClCompile></ClCompile>
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
if(this->GeneratorTarget->GetType() <= cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
this->WriteClOptions(*i, includes);
|
||||
// output rc compile flags <ResourceCompile></ResourceCompile>
|
||||
@ -2781,7 +2782,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
|
||||
// output manifest flags <Manifest></Manifest>
|
||||
this->WriteManifestOptions(*i);
|
||||
if(this->NsightTegra &&
|
||||
this->Target->GetType() == cmTarget::EXECUTABLE &&
|
||||
this->GeneratorTarget->GetType() == cmState::EXECUTABLE &&
|
||||
this->Target->GetPropertyAsBool("ANDROID_GUI"))
|
||||
{
|
||||
this->WriteAntBuildOptions(*i);
|
||||
@ -2794,7 +2795,7 @@ void
|
||||
cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName)
|
||||
{
|
||||
bool addedPrelink = false;
|
||||
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
|
||||
if (this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY &&
|
||||
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
{
|
||||
if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
|
||||
@ -2866,7 +2867,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
|
||||
i != depends.end(); ++i)
|
||||
{
|
||||
cmTarget const* dt = (*i)->Target;
|
||||
if(dt->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
if(dt->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -3002,7 +3003,7 @@ void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile()
|
||||
{
|
||||
if((this->GlobalGenerator->TargetsWindowsStore() ||
|
||||
this->GlobalGenerator->TargetsWindowsPhone())
|
||||
&& (cmTarget::EXECUTABLE == this->Target->GetType()))
|
||||
&& (cmState::EXECUTABLE == this->GeneratorTarget->GetType()))
|
||||
{
|
||||
std::string pfxFile;
|
||||
std::vector<cmSourceFile const*> certificates;
|
||||
@ -3131,7 +3132,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
|
||||
this->WriteString("<MinimumVisualStudioVersion>14.0"
|
||||
"</MinimumVisualStudioVersion>\n", 2);
|
||||
|
||||
if(this->Target->GetType() < cmTarget::UTILITY)
|
||||
if(this->GeneratorTarget->GetType() < cmState::UTILITY)
|
||||
{
|
||||
isAppContainer = true;
|
||||
}
|
||||
@ -3145,7 +3146,7 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
|
||||
this->WriteString("<MinimumVisualStudioVersion>12.0"
|
||||
"</MinimumVisualStudioVersion>\n", 2);
|
||||
|
||||
if (this->Target->GetType() < cmTarget::UTILITY)
|
||||
if (this->GeneratorTarget->GetType() < cmState::UTILITY)
|
||||
{
|
||||
isAppContainer = true;
|
||||
}
|
||||
@ -3159,12 +3160,13 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
|
||||
this->WriteString("<MinimumVisualStudioVersion>11.0"
|
||||
"</MinimumVisualStudioVersion>\n", 2);
|
||||
|
||||
if (isWindowsStore && this->Target->GetType() < cmTarget::UTILITY)
|
||||
if (isWindowsStore
|
||||
&& this->GeneratorTarget->GetType() < cmState::UTILITY)
|
||||
{
|
||||
isAppContainer = true;
|
||||
}
|
||||
else if (isWindowsPhone &&
|
||||
this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
this->WriteString("<XapOutputs>true</XapOutputs>\n", 2);
|
||||
this->WriteString("<XapFilename>", 2);
|
||||
@ -3221,7 +3223,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles()
|
||||
{
|
||||
// For Windows and Windows Phone executables, we will assume that if a
|
||||
// manifest is not present that we need to add all the necessary files
|
||||
if (this->Target->GetType() == cmTarget::EXECUTABLE)
|
||||
if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
|
||||
{
|
||||
std::vector<cmSourceFile const*> manifestSources;
|
||||
this->GeneratorTarget->GetAppManifest(manifestSources, "");
|
||||
|
@ -477,7 +477,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
|
||||
++libIt)
|
||||
{
|
||||
mf->AddLinkLibraryForTarget(targetName, *libIt,
|
||||
cmTarget::GENERAL);
|
||||
GENERAL_LibraryType);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user