Merge topic 'ninja-generator-prep'

32f8437 Fix line-too-long style violations
029ab31 Constify XCode generator getters to match cmGlobalGenerator
fec4b63 Fix configuration-dependent flag lookup in cmLocalGenerator::GetTargetFlags
557956f Introduce a cmGlobalGenerator::ResolveLanguageCompiler function
5b114c9 Introduce a cmLocalGenerator::ConvertToIncludeReference function
903d914 Make cmLocalGenerator::ConvertToLinkReference virtual
8a0eb78 Constify many getters of cmGlobalGenerator.
4532d36 Add const versions of some getters.
3db2973 Refactor TargetTypeNames.
This commit is contained in:
David Cole 2011-10-11 14:45:35 -04:00 committed by CMake Topic Stage
commit 1226404545
11 changed files with 184 additions and 152 deletions

View File

@ -404,7 +404,7 @@ cmComputeTargetDepends
// Describe the depender. // Describe the depender.
e << " \"" << depender->GetName() << "\" of type " e << " \"" << depender->GetName() << "\" of type "
<< cmTarget::TargetTypeNames[depender->GetType()] << "\n"; << cmTarget::GetTargetTypeName(depender->GetType()) << "\n";
// List its dependencies that are inside the component. // List its dependencies that are inside the component.
EdgeList const& nl = this->InitialGraph[i]; EdgeList const& nl = this->InitialGraph[i];

View File

@ -77,6 +77,79 @@ cmGlobalGenerator::~cmGlobalGenerator()
this->ClearExportSets(); 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 // Find the make program for the generator, required for try compiles
void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
{ {

View File

@ -76,6 +76,13 @@ public:
virtual void EnableLanguage(std::vector<std::string>const& languages, virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional); 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 * Try to determine system infomation, get it from another generator
*/ */
@ -120,6 +127,7 @@ public:
///! Get the CMake instance ///! Get the CMake instance
cmake *GetCMakeInstance() { return this->CMakeInstance; }; cmake *GetCMakeInstance() { return this->CMakeInstance; };
const cmake *GetCMakeInstance() const { return this->CMakeInstance; };
void SetConfiguredFilesPath(cmGlobalGenerator* gen); void SetConfiguredFilesPath(cmGlobalGenerator* gen);
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const { const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
@ -162,8 +170,8 @@ public:
int TryCompileTimeout; int TryCompileTimeout;
bool GetForceUnixPaths() {return this->ForceUnixPaths;} bool GetForceUnixPaths() const { return this->ForceUnixPaths; }
bool GetToolSupportsColor() { return this->ToolSupportsColor; } bool GetToolSupportsColor() const { return this->ToolSupportsColor; }
///! return the language for the given extension ///! return the language for the given extension
const char* GetLanguageFromExtension(const char* ext); const char* GetLanguageFromExtension(const char* ext);
@ -178,11 +186,11 @@ public:
virtual const char* GetCMakeCFGInitDirectory() { return "."; } virtual const char* GetCMakeCFGInitDirectory() { return "."; }
/** Get whether the generator should use a script for link commands. */ /** 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 /** Get whether the generator should produce special marks on rules
producing symbolic (non-file) outputs. */ 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. * 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 /** Get the manifest of all targets that will be built for each
configuration. This is valid during generation only. */ 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 /** Get the content of a directory. Directory listings are loaded
from disk at most once and cached. During the generation step from disk at most once and cached. During the generation step
@ -223,17 +232,17 @@ public:
void AddTarget(cmTargets::value_type &v); void AddTarget(cmTargets::value_type &v);
virtual const char* GetAllTargetName() { return "ALL_BUILD"; } virtual const char* GetAllTargetName() const { return "ALL_BUILD"; }
virtual const char* GetInstallTargetName() { return "INSTALL"; } virtual const char* GetInstallTargetName() const { return "INSTALL"; }
virtual const char* GetInstallLocalTargetName() { return 0; } virtual const char* GetInstallLocalTargetName() const { return 0; }
virtual const char* GetInstallStripTargetName() { return 0; } virtual const char* GetInstallStripTargetName() const { return 0; }
virtual const char* GetPreinstallTargetName() { return 0; } virtual const char* GetPreinstallTargetName() const { return 0; }
virtual const char* GetTestTargetName() { return "RUN_TESTS"; } virtual const char* GetTestTargetName() const { return "RUN_TESTS"; }
virtual const char* GetPackageTargetName() { return "PACKAGE"; } virtual const char* GetPackageTargetName() const { return "PACKAGE"; }
virtual const char* GetPackageSourceTargetName(){ return 0; } virtual const char* GetPackageSourceTargetName() const { return 0; }
virtual const char* GetEditCacheTargetName() { return 0; } virtual const char* GetEditCacheTargetName() const { return 0; }
virtual const char* GetRebuildCacheTargetName() { return 0; } virtual const char* GetRebuildCacheTargetName() const { return 0; }
virtual const char* GetCleanTargetName() { return 0; } virtual const char* GetCleanTargetName() const { return 0; }
// Class to track a set of dependencies. // Class to track a set of dependencies.
typedef cmTargetDependSet TargetDependSet; typedef cmTargetDependSet TargetDependSet;

View File

@ -39,7 +39,6 @@ void cmGlobalUnixMakefileGenerator3
bool optional) bool optional)
{ {
this->cmGlobalGenerator::EnableLanguage(languages, mf, optional); this->cmGlobalGenerator::EnableLanguage(languages, mf, optional);
std::string path;
for(std::vector<std::string>::const_iterator l = languages.begin(); for(std::vector<std::string>::const_iterator l = languages.begin();
l != languages.end(); ++l) l != languages.end(); ++l)
{ {
@ -47,74 +46,7 @@ void cmGlobalUnixMakefileGenerator3
{ {
continue; continue;
} }
const char* lang = l->c_str(); this->ResolveLanguageCompiler(*l, mf, 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");
}
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);
} }
} }

View File

@ -136,18 +136,18 @@ protected:
// does this generator need a requires step for any of its targets // does this generator need a requires step for any of its targets
bool NeedRequiresStep(cmTarget const&); bool NeedRequiresStep(cmTarget const&);
// Setup target names // Target name hooks for superclass.
virtual const char* GetAllTargetName() { return "all"; } const char* GetAllTargetName() const { return "all"; }
virtual const char* GetInstallTargetName() { return "install"; } const char* GetInstallTargetName() const { return "install"; }
virtual const char* GetInstallLocalTargetName() { return "install/local"; } const char* GetInstallLocalTargetName() const { return "install/local"; }
virtual const char* GetInstallStripTargetName() { return "install/strip"; } const char* GetInstallStripTargetName() const { return "install/strip"; }
virtual const char* GetPreinstallTargetName() { return "preinstall"; } const char* GetPreinstallTargetName() const { return "preinstall"; }
virtual const char* GetTestTargetName() { return "test"; } const char* GetTestTargetName() const { return "test"; }
virtual const char* GetPackageTargetName() { return "package"; } const char* GetPackageTargetName() const { return "package"; }
virtual const char* GetPackageSourceTargetName(){ return "package_source"; } const char* GetPackageSourceTargetName() const { return "package_source"; }
virtual const char* GetEditCacheTargetName() { return "edit_cache"; } const char* GetEditCacheTargetName() const { return "edit_cache"; }
virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; } const char* GetRebuildCacheTargetName() const { return "rebuild_cache"; }
virtual const char* GetCleanTargetName() { return "clean"; } const char* GetCleanTargetName() const { return "clean"; }
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() { return true; } virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() { return true; }

View File

@ -194,8 +194,8 @@ private:
void AppendFlag(std::string& flags, std::string const& flag); void AppendFlag(std::string& flags, std::string const& flag);
protected: protected:
virtual const char* GetInstallTargetName() { return "install"; } virtual const char* GetInstallTargetName() const { return "install"; }
virtual const char* GetPackageTargetName() { return "package"; } virtual const char* GetPackageTargetName() const { return "package"; }
unsigned int XcodeVersion; unsigned int XcodeVersion;
std::string VersionString; std::string VersionString;

View File

@ -996,7 +996,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
} }
if(variable == "TARGET_TYPE") if(variable == "TARGET_TYPE")
{ {
return cmTarget::TargetTypeNames[replaceValues.CMTarget->GetType()]; return cmTarget::GetTargetTypeName(replaceValues.CMTarget->GetType());
} }
} }
if(replaceValues.Output) if(replaceValues.Output)
@ -1184,6 +1184,13 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote,
return this->ConvertToOutputForExistingCommon(remotePath, result); 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, const char* cmLocalGenerator::GetIncludeFlags(const char* lang,
bool forResponseFile) bool forResponseFile)
@ -1285,7 +1292,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang,
} }
else else
{ {
includePath = this->ConvertToOutputForExisting(i->c_str()); includePath = this->ConvertToIncludeReference(*i);
} }
if(quotePaths && includePath.size() && includePath[0] != '\"') if(quotePaths && includePath.size() && includePath[0] != '\"')
{ {
@ -1456,6 +1463,17 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
linkFlags += targetLinkFlags; linkFlags += targetLinkFlags;
linkFlags += " "; linkFlags += " ";
} }
if(!buildType.empty())
{
std::string build = "STATIC_LIBRARY_FLAGS_";
build += buildType;
targetLinkFlags = target.GetProperty(build.c_str());
if(targetLinkFlags)
{
linkFlags += targetLinkFlags;
linkFlags += " ";
}
}
} }
break; break;
case cmTarget::MODULE_LIBRARY: case cmTarget::MODULE_LIBRARY:
@ -1464,7 +1482,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
{ {
linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable);
linkFlags += " "; linkFlags += " ";
if(buildType.size()) if(!buildType.empty())
{ {
std::string build = libraryLinkVariable; std::string build = libraryLinkVariable;
build += "_"; build += "_";
@ -1495,7 +1513,10 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
{ {
linkFlags += targetLinkFlags; linkFlags += targetLinkFlags;
linkFlags += " "; linkFlags += " ";
std::string configLinkFlags = targetLinkFlags; }
if(!buildType.empty())
{
std::string configLinkFlags = "LINK_FLAGS_";
configLinkFlags += buildType; configLinkFlags += buildType;
targetLinkFlags = target.GetProperty(configLinkFlags.c_str()); targetLinkFlags = target.GetProperty(configLinkFlags.c_str());
if(targetLinkFlags) if(targetLinkFlags)
@ -1514,7 +1535,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
linkFlags += linkFlags +=
this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS");
linkFlags += " "; linkFlags += " ";
if(buildType.size()) if(!buildType.empty())
{ {
std::string build = "CMAKE_EXE_LINKER_FLAGS_"; std::string build = "CMAKE_EXE_LINKER_FLAGS_";
build += buildType; build += buildType;
@ -1566,8 +1587,11 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
if(targetLinkFlags) if(targetLinkFlags)
{ {
linkFlags += targetLinkFlags; linkFlags += targetLinkFlags;
linkFlags += " "; linkFlags += " ";
std::string configLinkFlags = targetLinkFlags; }
if(!buildType.empty())
{
std::string configLinkFlags = "LINK_FLAGS_";
configLinkFlags += buildType; configLinkFlags += buildType;
targetLinkFlags = target.GetProperty(configLinkFlags.c_str()); targetLinkFlags = target.GetProperty(configLinkFlags.c_str());
if(targetLinkFlags) if(targetLinkFlags)

View File

@ -83,6 +83,8 @@ public:
///! Get the GlobalGenerator this is associated with ///! Get the GlobalGenerator this is associated with
cmGlobalGenerator *GetGlobalGenerator() { cmGlobalGenerator *GetGlobalGenerator() {
return this->GlobalGenerator; }; return this->GlobalGenerator; };
const cmGlobalGenerator *GetGlobalGenerator() const {
return this->GlobalGenerator; };
///! Set the Global Generator, done on creation by the GlobalGenerator ///! Set the Global Generator, done on creation by the GlobalGenerator
void SetGlobalGenerator(cmGlobalGenerator *gg); void SetGlobalGenerator(cmGlobalGenerator *gg);
@ -177,7 +179,9 @@ public:
path and short path if spaces. */ path and short path if spaces. */
std::string ConvertToOutputForExisting(RelativeRoot remote, std::string ConvertToOutputForExisting(RelativeRoot remote,
const char* local = 0); const char* local = 0);
virtual std::string ConvertToIncludeReference(std::string const& path);
/** Called from command-line hook to clear dependencies. */ /** Called from command-line hook to clear dependencies. */
virtual void ClearDependencies(cmMakefile* /* mf */, virtual void ClearDependencies(cmMakefile* /* mf */,
bool /* verbose */) {} bool /* verbose */) {}
@ -367,7 +371,7 @@ protected:
std::string FindRelativePathTopBinary(); std::string FindRelativePathTopBinary();
void SetupPathConversions(); 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 /** Check whether the native build system supports the given
definition. Issues a warning. */ definition. Issues a warning. */

View File

@ -1379,7 +1379,7 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
{ {
cmOStringStream e; cmOStringStream e;
e << "Target \"" << lib << "\" of type " e << "Target \"" << lib << "\" of type "
<< cmTarget::TargetTypeNames[static_cast<int>(tgt->GetType())] << cmTarget::GetTargetTypeName(tgt->GetType())
<< " may not be linked into another target. " << " may not be linked into another target. "
<< "One may link only to STATIC or SHARED libraries, or " << "One may link only to STATIC or SHARED libraries, or "
<< "to executables with the ENABLE_EXPORTS property set."; << "to executables with the ENABLE_EXPORTS property set.";

View File

@ -25,12 +25,35 @@
#include <queue> #include <queue>
#include <stdlib.h> // required for atof #include <stdlib.h> // required for atof
#include <assert.h> #include <assert.h>
const char* cmTarget::TargetTypeNames[] = {
"EXECUTABLE", "STATIC_LIBRARY", const char* cmTarget::GetTargetTypeName(TargetType targetType)
"SHARED_LIBRARY", "MODULE_LIBRARY", "UTILITY", "GLOBAL_TARGET", {
"INSTALL_FILES", "INSTALL_PROGRAMS", "INSTALL_DIRECTORY", switch( targetType )
"UNKNOWN_LIBRARY" {
}; 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 struct cmTarget::OutputInfo
@ -2346,7 +2369,7 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
std::string msg = "cmTarget::GetOutputInfo called for "; std::string msg = "cmTarget::GetOutputInfo called for ";
msg += this->GetName(); msg += this->GetName();
msg += " which has type "; msg += " which has type ";
msg += cmTarget::TargetTypeNames[this->GetType()]; msg += cmTarget::GetTargetTypeName(this->GetType());
this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, msg); this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, msg);
abort(); abort();
return 0; return 0;
@ -2645,40 +2668,7 @@ const char *cmTarget::GetProperty(const char* prop,
// the type property returns what type the target is // the type property returns what type the target is
if (!strcmp(prop,"TYPE")) if (!strcmp(prop,"TYPE"))
{ {
switch( this->GetType() ) return cmTarget::GetTargetTypeName(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;
} }
bool chain = false; bool chain = false;
const char *retVal = const char *retVal =

View File

@ -62,7 +62,7 @@ public:
SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET, SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET,
INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY, INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY,
UNKNOWN_LIBRARY}; UNKNOWN_LIBRARY};
static const char* TargetTypeNames[]; static const char* GetTargetTypeName(TargetType targetType);
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD }; enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
/** /**