summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx236
1 files changed, 96 insertions, 140 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b8beb5c..fecdc45 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -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;
@@ -95,11 +52,6 @@ public:
};
//----------------------------------------------------------------------------
-cmTargetInternals::~cmTargetInternals()
-{
-}
-
-//----------------------------------------------------------------------------
cmTarget::cmTarget()
{
this->Makefile = 0;
@@ -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,22 +750,23 @@ 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)
- ? targetNameGenex(lib)
- : lib;
+ const std::string libName =
+ (isNonImportedTarget && llt != GENERAL_LibraryType)
+ ? targetNameGenex(lib)
+ : lib;
this->AppendProperty("LINK_LIBRARIES",
this->GetDebugGeneratorExpressions(libName,
llt).c_str());
}
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;