summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.h')
-rw-r--r--Source/cmGlobalXCodeGenerator.h114
1 files changed, 55 insertions, 59 deletions
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index c3b3613..2ca4c19 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -20,7 +20,6 @@ class cmGlobalGeneratorFactory;
class cmSourceFile;
class cmSourceGroup;
-
/** \class cmGlobalXCodeGenerator
* \brief Write a Unix makefiles.
*
@@ -33,36 +32,34 @@ public:
static cmGlobalGeneratorFactory* NewFactory();
///! Get the name for the generator.
- virtual std::string GetName() const {
- return cmGlobalXCodeGenerator::GetActualName();}
- static std::string GetActualName() {return "Xcode";}
+ virtual std::string GetName() const
+ {
+ return cmGlobalXCodeGenerator::GetActualName();
+ }
+ static std::string GetActualName() { return "Xcode"; }
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
- virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile *mf);
+ virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
- virtual void EnableLanguage(std::vector<std::string>const& languages,
- cmMakefile *, bool optional);
+ virtual void EnableLanguage(std::vector<std::string> const& languages,
+ cmMakefile*, bool optional);
/**
* Try running cmake and building a file. This is used for dynalically
* loaded commands, not as part of the usual build process.
*/
virtual void GenerateBuildCommand(
- std::vector<std::string>& makeCommand,
- const std::string& makeProgram,
- const std::string& projectName,
- const std::string& projectDir,
- const std::string& targetName,
- const std::string& config,
- bool fast, bool verbose,
- std::vector<std::string> const& makeOptions = std::vector<std::string>()
- );
+ std::vector<std::string>& makeCommand, const std::string& makeProgram,
+ const std::string& projectName, const std::string& projectDir,
+ const std::string& targetName, const std::string& config, bool fast,
+ bool verbose,
+ std::vector<std::string> const& makeOptions = std::vector<std::string>());
/** Append the subdirectory for the given configuration. */
virtual void AppendDirectoryForConfig(const std::string& prefix,
@@ -86,17 +83,17 @@ public:
virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
void AppendFlag(std::string& flags, std::string const& flag);
+
protected:
virtual void AddExtraIDETargets();
virtual void Generate();
+
private:
cmXCodeObject* CreateOrGetPBXGroup(cmGeneratorTarget* gtgt,
cmSourceGroup* sg);
- cmXCodeObject* CreatePBXGroup(cmXCodeObject *parent,
- std::string name);
+ cmXCodeObject* CreatePBXGroup(cmXCodeObject* parent, std::string name);
bool CreateGroups(cmLocalGenerator* root,
- std::vector<cmLocalGenerator*>&
- generators);
+ std::vector<cmLocalGenerator*>& generators);
std::string XCodeEscapePath(const std::string& p);
std::string RelativeToSource(const char* p);
std::string RelativeToBinary(const char* p);
@@ -107,22 +104,21 @@ private:
cmXCodeObject* resourceBuildPhase,
std::vector<cmXCodeObject*> contentBuildPhases,
cmXCodeObject* frameworkBuildPhase,
- cmGeneratorTarget *gtgt);
+ cmGeneratorTarget* gtgt);
- std::string ComputeInfoPListLocation(cmGeneratorTarget *target);
+ std::string ComputeInfoPListLocation(cmGeneratorTarget* target);
void AddCommandsToBuildPhase(cmXCodeObject* buildphase,
- cmGeneratorTarget *target,
- std::vector<cmCustomCommand>
- const & commands,
+ cmGeneratorTarget* target,
+ std::vector<cmCustomCommand> const& commands,
const char* commandFileName);
void CreateCustomRulesMakefile(const char* makefileBasename,
cmGeneratorTarget* target,
- std::vector<cmCustomCommand> const & commands,
+ std::vector<cmCustomCommand> const& commands,
const std::string& configName);
- cmXCodeObject* FindXCodeTarget(const cmGeneratorTarget *);
+ cmXCodeObject* FindXCodeTarget(const cmGeneratorTarget*);
std::string GetOrCreateId(const std::string& name, const std::string& id);
// create cmXCodeObject from these functions so that memory can be managed
@@ -132,23 +128,23 @@ private:
cmXCodeObject* CreateString(const std::string& s);
cmXCodeObject* CreateObjectReference(cmXCodeObject*);
cmXCodeObject* CreateFlatClone(cmXCodeObject*);
- cmXCodeObject* CreateXCodeTarget(cmGeneratorTarget *gtgt,
+ cmXCodeObject* CreateXCodeTarget(cmGeneratorTarget* gtgt,
cmXCodeObject* buildPhases);
void ForceLinkerLanguages();
void ForceLinkerLanguage(cmGeneratorTarget* gtgt);
- const char* GetTargetLinkFlagsVar(const cmGeneratorTarget *target) const;
+ const char* GetTargetLinkFlagsVar(const cmGeneratorTarget* target) const;
const char* GetTargetFileType(cmGeneratorTarget* target);
const char* GetTargetProductType(cmGeneratorTarget* target);
std::string AddConfigurations(cmXCodeObject* target,
- cmGeneratorTarget *gtgt);
+ cmGeneratorTarget* gtgt);
void AppendOrAddBuildSetting(cmXCodeObject* settings, const char* attr,
const char* value);
void AppendBuildSettingAttribute(cmXCodeObject* target, const char* attr,
const char* value,
const std::string& configName);
- cmXCodeObject* CreateUtilityTarget(cmGeneratorTarget *gtgt);
+ cmXCodeObject* CreateUtilityTarget(cmGeneratorTarget* gtgt);
void AddDependAndLinkInformation(cmXCodeObject* target);
- void CreateBuildSettings(cmGeneratorTarget *gtgt,
+ void CreateBuildSettings(cmGeneratorTarget* gtgt,
cmXCodeObject* buildSettings,
const std::string& buildType);
std::string ExtractFlag(const char* flag, std::string& flags);
@@ -165,32 +161,28 @@ private:
std::vector<cmLocalGenerator*>& generators);
void WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
- cmXCodeObject* CreateXCodeFileReferenceFromPath(const std::string &fullpath,
- cmGeneratorTarget *target,
- const std::string &lang,
+ cmXCodeObject* CreateXCodeFileReferenceFromPath(const std::string& fullpath,
+ cmGeneratorTarget* target,
+ const std::string& lang,
cmSourceFile* sf);
- cmXCodeObject* CreateXCodeSourceFileFromPath(const std::string &fullpath,
- cmGeneratorTarget *target,
- const std::string &lang,
+ cmXCodeObject* CreateXCodeSourceFileFromPath(const std::string& fullpath,
+ cmGeneratorTarget* target,
+ const std::string& lang,
cmSourceFile* sf);
cmXCodeObject* CreateXCodeFileReference(cmSourceFile* sf,
- cmGeneratorTarget *target);
- cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen,
- cmSourceFile* sf,
- cmGeneratorTarget *gtgt);
- bool CreateXCodeTargets(cmLocalGenerator* gen,
- std::vector<cmXCodeObject*>&);
+ cmGeneratorTarget* target);
+ cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, cmSourceFile* sf,
+ cmGeneratorTarget* gtgt);
+ bool CreateXCodeTargets(cmLocalGenerator* gen, std::vector<cmXCodeObject*>&);
bool IsHeaderFile(cmSourceFile*);
- void AddDependTarget(cmXCodeObject* target,
- cmXCodeObject* dependTarget);
+ void AddDependTarget(cmXCodeObject* target, cmXCodeObject* dependTarget);
void CreateXCodeDependHackTarget(std::vector<cmXCodeObject*>& targets);
bool SpecialTargetEmitted(std::string const& tname);
void SetGenerationRoot(cmLocalGenerator* root);
void AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens);
- cmXCodeObject* CreateBuildPhase(const char* name,
- const char* name2,
- cmGeneratorTarget *target,
+ cmXCodeObject* CreateBuildPhase(const char* name, const char* name2,
+ cmGeneratorTarget* target,
const std::vector<cmCustomCommand>&);
void CreateReRunCMakeFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*> const& gens);
@@ -211,6 +203,7 @@ private:
bool dflag = false);
void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
+
protected:
virtual const char* GetInstallTargetName() const { return "install"; }
virtual const char* GetPackageTargetName() const { return "package"; }
@@ -220,6 +213,7 @@ protected:
std::set<std::string> XCodeObjectIDs;
std::vector<cmXCodeObject*> XCodeObjects;
cmXCodeObject* RootObject;
+
private:
std::string const& GetXcodeBuildCommand();
std::string FindXcodeBuildCommand();
@@ -227,13 +221,15 @@ private:
bool XcodeBuildCommandInitialized;
void PrintCompilerAdvice(std::ostream&, std::string const&,
- const char*) const {}
+ const char*) const
+ {
+ }
- std::string GetObjectsNormalDirectory(const std::string &projName,
- const std::string &configName,
- const cmGeneratorTarget *t) const;
+ std::string GetObjectsNormalDirectory(const std::string& projName,
+ const std::string& configName,
+ const cmGeneratorTarget* t) const;
- void addObject(cmXCodeObject *obj);
+ void addObject(cmXCodeObject* obj);
std::string PostBuildMakeTarget(std::string const& tName,
std::string const& configName);
cmXCodeObject* MainGroupChildren;
@@ -249,11 +245,11 @@ private:
std::vector<std::string> CurrentOutputDirectoryComponents;
std::vector<std::string> ProjectSourceDirectoryComponents;
std::vector<std::string> ProjectOutputDirectoryComponents;
- std::map<std::string, cmXCodeObject* > GroupMap;
- std::map<std::string, cmXCodeObject* > GroupNameMap;
- std::map<std::string, cmXCodeObject* > TargetGroup;
- std::map<std::string, cmXCodeObject* > FileRefs;
- std::map<cmGeneratorTarget const*, cmXCodeObject* > XCodeObjectMap;
+ std::map<std::string, cmXCodeObject*> GroupMap;
+ std::map<std::string, cmXCodeObject*> GroupNameMap;
+ std::map<std::string, cmXCodeObject*> TargetGroup;
+ std::map<std::string, cmXCodeObject*> FileRefs;
+ std::map<cmGeneratorTarget const*, cmXCodeObject*> XCodeObjectMap;
std::vector<std::string> Architectures;
std::string GeneratorToolset;
};