Merge topic 'ninja-generator-prep'
32f8437
Fix line-too-long style violations029ab31
Constify XCode generator getters to match cmGlobalGeneratorfec4b63
Fix configuration-dependent flag lookup in cmLocalGenerator::GetTargetFlags557956f
Introduce a cmGlobalGenerator::ResolveLanguageCompiler function5b114c9
Introduce a cmLocalGenerator::ConvertToIncludeReference function903d914
Make cmLocalGenerator::ConvertToLinkReference virtual8a0eb78
Constify many getters of cmGlobalGenerator.4532d36
Add const versions of some getters.3db2973
Refactor TargetTypeNames.
This commit is contained in:
commit
1226404545
|
@ -404,7 +404,7 @@ cmComputeTargetDepends
|
|||
|
||||
// Describe the depender.
|
||||
e << " \"" << depender->GetName() << "\" of type "
|
||||
<< cmTarget::TargetTypeNames[depender->GetType()] << "\n";
|
||||
<< cmTarget::GetTargetTypeName(depender->GetType()) << "\n";
|
||||
|
||||
// List its dependencies that are inside the component.
|
||||
EdgeList const& nl = this->InitialGraph[i];
|
||||
|
|
|
@ -77,6 +77,79 @@ cmGlobalGenerator::~cmGlobalGenerator()
|
|||
this->ClearExportSets();
|
||||
}
|
||||
|
||||
void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
||||
cmMakefile *mf,
|
||||
bool optional) {
|
||||
std::string langComp = "CMAKE_";
|
||||
langComp += lang;
|
||||
langComp += "_COMPILER";
|
||||
|
||||
if(!mf->GetDefinition(langComp.c_str()))
|
||||
{
|
||||
if(!optional)
|
||||
{
|
||||
cmSystemTools::Error(langComp.c_str(),
|
||||
" not set, after EnableLanguage");
|
||||
}
|
||||
return;
|
||||
}
|
||||
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
||||
std::string path;
|
||||
if(!cmSystemTools::FileIsFullPath(name))
|
||||
{
|
||||
path = cmSystemTools::FindProgram(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = name;
|
||||
}
|
||||
if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str()))
|
||||
&& (optional==false))
|
||||
{
|
||||
std::string message = "your ";
|
||||
message += lang;
|
||||
message += " compiler: \"";
|
||||
message += name;
|
||||
message += "\" was not found. Please set ";
|
||||
message += langComp;
|
||||
message += " to a valid compiler path or name.";
|
||||
cmSystemTools::Error(message.c_str());
|
||||
path = name;
|
||||
}
|
||||
std::string doc = lang;
|
||||
doc += " compiler.";
|
||||
const char* cname = this->GetCMakeInstance()->
|
||||
GetCacheManager()->GetCacheValue(langComp.c_str());
|
||||
std::string changeVars;
|
||||
if(cname && (path != cname) && (optional==false))
|
||||
{
|
||||
std::string cnameString = cname;
|
||||
std::string pathString = path;
|
||||
// get rid of potentially multiple slashes:
|
||||
cmSystemTools::ConvertToUnixSlashes(cnameString);
|
||||
cmSystemTools::ConvertToUnixSlashes(pathString);
|
||||
if (cnameString != pathString)
|
||||
{
|
||||
const char* cvars =
|
||||
this->GetCMakeInstance()->GetProperty(
|
||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
||||
if(cvars)
|
||||
{
|
||||
changeVars += cvars;
|
||||
changeVars += ";";
|
||||
}
|
||||
changeVars += langComp;
|
||||
changeVars += ";";
|
||||
changeVars += cname;
|
||||
this->GetCMakeInstance()->SetProperty(
|
||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_",
|
||||
changeVars.c_str());
|
||||
}
|
||||
}
|
||||
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
||||
doc.c_str(), cmCacheManager::FILEPATH);
|
||||
}
|
||||
|
||||
// Find the make program for the generator, required for try compiles
|
||||
void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
{
|
||||
|
|
|
@ -76,6 +76,13 @@ public:
|
|||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||
cmMakefile *, bool optional);
|
||||
|
||||
/**
|
||||
* Resolve the CMAKE_<lang>_COMPILER setting for the given language.
|
||||
* Intended to be called from EnableLanguage.
|
||||
*/
|
||||
void ResolveLanguageCompiler(const std::string &lang, cmMakefile *mf,
|
||||
bool optional);
|
||||
|
||||
/**
|
||||
* Try to determine system infomation, get it from another generator
|
||||
*/
|
||||
|
@ -120,6 +127,7 @@ public:
|
|||
|
||||
///! Get the CMake instance
|
||||
cmake *GetCMakeInstance() { return this->CMakeInstance; };
|
||||
const cmake *GetCMakeInstance() const { return this->CMakeInstance; };
|
||||
|
||||
void SetConfiguredFilesPath(cmGlobalGenerator* gen);
|
||||
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
|
||||
|
@ -162,8 +170,8 @@ public:
|
|||
|
||||
int TryCompileTimeout;
|
||||
|
||||
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
|
||||
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
|
||||
bool GetForceUnixPaths() const { return this->ForceUnixPaths; }
|
||||
bool GetToolSupportsColor() const { return this->ToolSupportsColor; }
|
||||
|
||||
///! return the language for the given extension
|
||||
const char* GetLanguageFromExtension(const char* ext);
|
||||
|
@ -178,11 +186,11 @@ public:
|
|||
virtual const char* GetCMakeCFGInitDirectory() { return "."; }
|
||||
|
||||
/** Get whether the generator should use a script for link commands. */
|
||||
bool GetUseLinkScript() { return this->UseLinkScript; }
|
||||
bool GetUseLinkScript() const { return this->UseLinkScript; }
|
||||
|
||||
/** Get whether the generator should produce special marks on rules
|
||||
producing symbolic (non-file) outputs. */
|
||||
bool GetNeedSymbolicMark() { return this->NeedSymbolicMark; }
|
||||
bool GetNeedSymbolicMark() const { return this->NeedSymbolicMark; }
|
||||
|
||||
/*
|
||||
* Determine what program to use for building the project.
|
||||
|
@ -212,7 +220,8 @@ public:
|
|||
|
||||
/** Get the manifest of all targets that will be built for each
|
||||
configuration. This is valid during generation only. */
|
||||
cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; }
|
||||
cmTargetManifest const& GetTargetManifest() const
|
||||
{ return this->TargetManifest; }
|
||||
|
||||
/** Get the content of a directory. Directory listings are loaded
|
||||
from disk at most once and cached. During the generation step
|
||||
|
@ -223,17 +232,17 @@ public:
|
|||
|
||||
void AddTarget(cmTargets::value_type &v);
|
||||
|
||||
virtual const char* GetAllTargetName() { return "ALL_BUILD"; }
|
||||
virtual const char* GetInstallTargetName() { return "INSTALL"; }
|
||||
virtual const char* GetInstallLocalTargetName() { return 0; }
|
||||
virtual const char* GetInstallStripTargetName() { return 0; }
|
||||
virtual const char* GetPreinstallTargetName() { return 0; }
|
||||
virtual const char* GetTestTargetName() { return "RUN_TESTS"; }
|
||||
virtual const char* GetPackageTargetName() { return "PACKAGE"; }
|
||||
virtual const char* GetPackageSourceTargetName(){ return 0; }
|
||||
virtual const char* GetEditCacheTargetName() { return 0; }
|
||||
virtual const char* GetRebuildCacheTargetName() { return 0; }
|
||||
virtual const char* GetCleanTargetName() { return 0; }
|
||||
virtual const char* GetAllTargetName() const { return "ALL_BUILD"; }
|
||||
virtual const char* GetInstallTargetName() const { return "INSTALL"; }
|
||||
virtual const char* GetInstallLocalTargetName() const { return 0; }
|
||||
virtual const char* GetInstallStripTargetName() const { return 0; }
|
||||
virtual const char* GetPreinstallTargetName() const { return 0; }
|
||||
virtual const char* GetTestTargetName() const { return "RUN_TESTS"; }
|
||||
virtual const char* GetPackageTargetName() const { return "PACKAGE"; }
|
||||
virtual const char* GetPackageSourceTargetName() const { return 0; }
|
||||
virtual const char* GetEditCacheTargetName() const { return 0; }
|
||||
virtual const char* GetRebuildCacheTargetName() const { return 0; }
|
||||
virtual const char* GetCleanTargetName() const { return 0; }
|
||||
|
||||
// Class to track a set of dependencies.
|
||||
typedef cmTargetDependSet TargetDependSet;
|
||||
|
|
|
@ -39,7 +39,6 @@ void cmGlobalUnixMakefileGenerator3
|
|||
bool optional)
|
||||
{
|
||||
this->cmGlobalGenerator::EnableLanguage(languages, mf, optional);
|
||||
std::string path;
|
||||
for(std::vector<std::string>::const_iterator l = languages.begin();
|
||||
l != languages.end(); ++l)
|
||||
{
|
||||
|
@ -47,74 +46,7 @@ void cmGlobalUnixMakefileGenerator3
|
|||
{
|
||||
continue;
|
||||
}
|
||||
const char* lang = l->c_str();
|
||||
std::string langComp = "CMAKE_";
|
||||
langComp += lang;
|
||||
langComp += "_COMPILER";
|
||||
|
||||
if(!mf->GetDefinition(langComp.c_str()))
|
||||
{
|
||||
if(!optional)
|
||||
{
|
||||
cmSystemTools::Error(langComp.c_str(),
|
||||
" not set, after EnableLanguage");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
||||
if(!cmSystemTools::FileIsFullPath(name))
|
||||
{
|
||||
path = cmSystemTools::FindProgram(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = name;
|
||||
}
|
||||
if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str()))
|
||||
&& (optional==false))
|
||||
{
|
||||
std::string message = "your ";
|
||||
message += lang;
|
||||
message += " compiler: \"";
|
||||
message += name;
|
||||
message += "\" was not found. Please set ";
|
||||
message += langComp;
|
||||
message += " to a valid compiler path or name.";
|
||||
cmSystemTools::Error(message.c_str());
|
||||
path = name;
|
||||
}
|
||||
std::string doc = lang;
|
||||
doc += " compiler.";
|
||||
const char* cname = this->GetCMakeInstance()->
|
||||
GetCacheManager()->GetCacheValue(langComp.c_str());
|
||||
std::string changeVars;
|
||||
if(cname && (path != cname) && (optional==false))
|
||||
{
|
||||
std::string cnameString = cname;
|
||||
std::string pathString = path;
|
||||
// get rid of potentially multiple slashes:
|
||||
cmSystemTools::ConvertToUnixSlashes(cnameString);
|
||||
cmSystemTools::ConvertToUnixSlashes(pathString);
|
||||
if (cnameString != pathString)
|
||||
{
|
||||
const char* cvars =
|
||||
this->GetCMakeInstance()->GetProperty(
|
||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_");
|
||||
if(cvars)
|
||||
{
|
||||
changeVars += cvars;
|
||||
changeVars += ";";
|
||||
}
|
||||
changeVars += langComp;
|
||||
changeVars += ";";
|
||||
changeVars += cname;
|
||||
this->GetCMakeInstance()->SetProperty(
|
||||
"__CMAKE_DELETE_CACHE_CHANGE_VARS_",
|
||||
changeVars.c_str());
|
||||
}
|
||||
}
|
||||
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
||||
doc.c_str(), cmCacheManager::FILEPATH);
|
||||
this->ResolveLanguageCompiler(*l, mf, optional);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,18 +136,18 @@ protected:
|
|||
// does this generator need a requires step for any of its targets
|
||||
bool NeedRequiresStep(cmTarget const&);
|
||||
|
||||
// Setup target names
|
||||
virtual const char* GetAllTargetName() { return "all"; }
|
||||
virtual const char* GetInstallTargetName() { return "install"; }
|
||||
virtual const char* GetInstallLocalTargetName() { return "install/local"; }
|
||||
virtual const char* GetInstallStripTargetName() { return "install/strip"; }
|
||||
virtual const char* GetPreinstallTargetName() { return "preinstall"; }
|
||||
virtual const char* GetTestTargetName() { return "test"; }
|
||||
virtual const char* GetPackageTargetName() { return "package"; }
|
||||
virtual const char* GetPackageSourceTargetName(){ return "package_source"; }
|
||||
virtual const char* GetEditCacheTargetName() { return "edit_cache"; }
|
||||
virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; }
|
||||
virtual const char* GetCleanTargetName() { return "clean"; }
|
||||
// Target name hooks for superclass.
|
||||
const char* GetAllTargetName() const { return "all"; }
|
||||
const char* GetInstallTargetName() const { return "install"; }
|
||||
const char* GetInstallLocalTargetName() const { return "install/local"; }
|
||||
const char* GetInstallStripTargetName() const { return "install/strip"; }
|
||||
const char* GetPreinstallTargetName() const { return "preinstall"; }
|
||||
const char* GetTestTargetName() const { return "test"; }
|
||||
const char* GetPackageTargetName() const { return "package"; }
|
||||
const char* GetPackageSourceTargetName() const { return "package_source"; }
|
||||
const char* GetEditCacheTargetName() const { return "edit_cache"; }
|
||||
const char* GetRebuildCacheTargetName() const { return "rebuild_cache"; }
|
||||
const char* GetCleanTargetName() const { return "clean"; }
|
||||
|
||||
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() { return true; }
|
||||
|
||||
|
|
|
@ -194,8 +194,8 @@ private:
|
|||
void AppendFlag(std::string& flags, std::string const& flag);
|
||||
|
||||
protected:
|
||||
virtual const char* GetInstallTargetName() { return "install"; }
|
||||
virtual const char* GetPackageTargetName() { return "package"; }
|
||||
virtual const char* GetInstallTargetName() const { return "install"; }
|
||||
virtual const char* GetPackageTargetName() const { return "package"; }
|
||||
|
||||
unsigned int XcodeVersion;
|
||||
std::string VersionString;
|
||||
|
|
|
@ -996,7 +996,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
|
|||
}
|
||||
if(variable == "TARGET_TYPE")
|
||||
{
|
||||
return cmTarget::TargetTypeNames[replaceValues.CMTarget->GetType()];
|
||||
return cmTarget::GetTargetTypeName(replaceValues.CMTarget->GetType());
|
||||
}
|
||||
}
|
||||
if(replaceValues.Output)
|
||||
|
@ -1184,6 +1184,13 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
|
|||
return this->ConvertToOutputForExistingCommon(remotePath, result);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string
|
||||
cmLocalGenerator::ConvertToIncludeReference(std::string const& path)
|
||||
{
|
||||
return this->ConvertToOutputForExisting(path.c_str());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmLocalGenerator::GetIncludeFlags(const char* lang,
|
||||
bool forResponseFile)
|
||||
|
@ -1285,7 +1292,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang,
|
|||
}
|
||||
else
|
||||
{
|
||||
includePath = this->ConvertToOutputForExisting(i->c_str());
|
||||
includePath = this->ConvertToIncludeReference(*i);
|
||||
}
|
||||
if(quotePaths && includePath.size() && includePath[0] != '\"')
|
||||
{
|
||||
|
@ -1456,6 +1463,17 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
linkFlags += targetLinkFlags;
|
||||
linkFlags += " ";
|
||||
}
|
||||
if(!buildType.empty())
|
||||
{
|
||||
std::string build = "STATIC_LIBRARY_FLAGS_";
|
||||
build += buildType;
|
||||
targetLinkFlags = target.GetProperty(build.c_str());
|
||||
if(targetLinkFlags)
|
||||
{
|
||||
linkFlags += targetLinkFlags;
|
||||
linkFlags += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
|
@ -1464,7 +1482,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
{
|
||||
linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable);
|
||||
linkFlags += " ";
|
||||
if(buildType.size())
|
||||
if(!buildType.empty())
|
||||
{
|
||||
std::string build = libraryLinkVariable;
|
||||
build += "_";
|
||||
|
@ -1495,7 +1513,10 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
{
|
||||
linkFlags += targetLinkFlags;
|
||||
linkFlags += " ";
|
||||
std::string configLinkFlags = targetLinkFlags;
|
||||
}
|
||||
if(!buildType.empty())
|
||||
{
|
||||
std::string configLinkFlags = "LINK_FLAGS_";
|
||||
configLinkFlags += buildType;
|
||||
targetLinkFlags = target.GetProperty(configLinkFlags.c_str());
|
||||
if(targetLinkFlags)
|
||||
|
@ -1514,7 +1535,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
linkFlags +=
|
||||
this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
|
||||
linkFlags += " ";
|
||||
if(buildType.size())
|
||||
if(!buildType.empty())
|
||||
{
|
||||
std::string build = "CMAKE_EXE_LINKER_FLAGS_";
|
||||
build += buildType;
|
||||
|
@ -1566,8 +1587,11 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
if(targetLinkFlags)
|
||||
{
|
||||
linkFlags += targetLinkFlags;
|
||||
linkFlags += " ";
|
||||
std::string configLinkFlags = targetLinkFlags;
|
||||
linkFlags += " ";
|
||||
}
|
||||
if(!buildType.empty())
|
||||
{
|
||||
std::string configLinkFlags = "LINK_FLAGS_";
|
||||
configLinkFlags += buildType;
|
||||
targetLinkFlags = target.GetProperty(configLinkFlags.c_str());
|
||||
if(targetLinkFlags)
|
||||
|
|
|
@ -83,6 +83,8 @@ public:
|
|||
///! Get the GlobalGenerator this is associated with
|
||||
cmGlobalGenerator *GetGlobalGenerator() {
|
||||
return this->GlobalGenerator; };
|
||||
const cmGlobalGenerator *GetGlobalGenerator() const {
|
||||
return this->GlobalGenerator; };
|
||||
|
||||
///! Set the Global Generator, done on creation by the GlobalGenerator
|
||||
void SetGlobalGenerator(cmGlobalGenerator *gg);
|
||||
|
@ -177,7 +179,9 @@ public:
|
|||
path and short path if spaces. */
|
||||
std::string ConvertToOutputForExisting(RelativeRoot remote,
|
||||
const char* local = 0);
|
||||
|
||||
|
||||
virtual std::string ConvertToIncludeReference(std::string const& path);
|
||||
|
||||
/** Called from command-line hook to clear dependencies. */
|
||||
virtual void ClearDependencies(cmMakefile* /* mf */,
|
||||
bool /* verbose */) {}
|
||||
|
@ -367,7 +371,7 @@ protected:
|
|||
std::string FindRelativePathTopBinary();
|
||||
void SetupPathConversions();
|
||||
|
||||
std::string ConvertToLinkReference(std::string const& lib);
|
||||
virtual std::string ConvertToLinkReference(std::string const& lib);
|
||||
|
||||
/** Check whether the native build system supports the given
|
||||
definition. Issues a warning. */
|
||||
|
|
|
@ -1379,7 +1379,7 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
|
|||
{
|
||||
cmOStringStream e;
|
||||
e << "Target \"" << lib << "\" of type "
|
||||
<< cmTarget::TargetTypeNames[static_cast<int>(tgt->GetType())]
|
||||
<< cmTarget::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.";
|
||||
|
|
|
@ -25,12 +25,35 @@
|
|||
#include <queue>
|
||||
#include <stdlib.h> // required for atof
|
||||
#include <assert.h>
|
||||
const char* cmTarget::TargetTypeNames[] = {
|
||||
"EXECUTABLE", "STATIC_LIBRARY",
|
||||
"SHARED_LIBRARY", "MODULE_LIBRARY", "UTILITY", "GLOBAL_TARGET",
|
||||
"INSTALL_FILES", "INSTALL_PROGRAMS", "INSTALL_DIRECTORY",
|
||||
"UNKNOWN_LIBRARY"
|
||||
};
|
||||
|
||||
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::EXECUTABLE:
|
||||
return "EXECUTABLE";
|
||||
case cmTarget::UTILITY:
|
||||
return "UTILITY";
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
return "GLOBAL_TARGET";
|
||||
case cmTarget::INSTALL_FILES:
|
||||
return "INSTALL_FILES";
|
||||
case cmTarget::INSTALL_PROGRAMS:
|
||||
return "INSTALL_PROGRAMS";
|
||||
case cmTarget::INSTALL_DIRECTORY:
|
||||
return "INSTALL_DIRECTORY";
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
return "UNKNOWN_LIBRARY";
|
||||
}
|
||||
assert(0 && "Unexpected target type");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
struct cmTarget::OutputInfo
|
||||
|
@ -2346,7 +2369,7 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
|
|||
std::string msg = "cmTarget::GetOutputInfo called for ";
|
||||
msg += this->GetName();
|
||||
msg += " which has type ";
|
||||
msg += cmTarget::TargetTypeNames[this->GetType()];
|
||||
msg += cmTarget::GetTargetTypeName(this->GetType());
|
||||
this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, msg);
|
||||
abort();
|
||||
return 0;
|
||||
|
@ -2645,40 +2668,7 @@ const char *cmTarget::GetProperty(const char* prop,
|
|||
// the type property returns what type the target is
|
||||
if (!strcmp(prop,"TYPE"))
|
||||
{
|
||||
switch( this->GetType() )
|
||||
{
|
||||
case cmTarget::STATIC_LIBRARY:
|
||||
return "STATIC_LIBRARY";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
return "MODULE_LIBRARY";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::SHARED_LIBRARY:
|
||||
return "SHARED_LIBRARY";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::EXECUTABLE:
|
||||
return "EXECUTABLE";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::UTILITY:
|
||||
return "UTILITY";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::GLOBAL_TARGET:
|
||||
return "GLOBAL_TARGET";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::INSTALL_FILES:
|
||||
return "INSTALL_FILES";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::INSTALL_PROGRAMS:
|
||||
return "INSTALL_PROGRAMS";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::INSTALL_DIRECTORY:
|
||||
return "INSTALL_DIRECTORY";
|
||||
// break; /* unreachable */
|
||||
case cmTarget::UNKNOWN_LIBRARY:
|
||||
return "UNKNOWN_LIBRARY";
|
||||
// break; /* unreachable */
|
||||
}
|
||||
return 0;
|
||||
return cmTarget::GetTargetTypeName(this->GetType());
|
||||
}
|
||||
bool chain = false;
|
||||
const char *retVal =
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET,
|
||||
INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY,
|
||||
UNKNOWN_LIBRARY};
|
||||
static const char* TargetTypeNames[];
|
||||
static const char* GetTargetTypeName(TargetType targetType);
|
||||
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue