summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 26690af..5268731 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -16,6 +16,7 @@
#include "cmStandardIncludes.h"
#include "cmTarget.h" // For cmTargets
+#include "cmTargetDepend.h" // For cmTargetDependSet
class cmake;
class cmMakefile;
@@ -38,31 +39,31 @@ public:
///! Free any memory allocated with the GlobalGenerator
cmGlobalGenerator();
virtual ~cmGlobalGenerator();
-
+
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
///! Get the name for this generator
virtual const char *GetName() const { return "Generic"; };
-
+
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
-
+
/**
* Create LocalGenerators and process the CMakeLists files. This does not
- * actually produce any makefiles, DSPs, etc.
+ * actually produce any makefiles, DSPs, etc.
*/
virtual void Configure();
/**
* Generate the all required files for building this project/tree. This
* basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
+ * requests that they Generate.
*/
virtual void Generate();
/**
- * Set/Get and Clear the enabled languages.
+ * Set/Get and Clear the enabled languages.
*/
void SetLanguageEnabled(const char*, cmMakefile* mf);
bool GetLanguageEnabled(const char*) const;
@@ -70,7 +71,7 @@ public:
void GetEnabledLanguages(std::vector<std::string>& lang);
/**
* Try to determine system infomation such as shared library
- * extension, pthreads, byte order etc.
+ * extension, pthreads, byte order etc.
*/
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
@@ -89,7 +90,7 @@ public:
const char *projectName, const char *targetName,
bool fast, std::string *output, cmMakefile* mf);
-
+
/**
* Build a file given the following information. This is a more direct call
* that is used by both CTest and TryCompile. If target name is NULL or
@@ -105,28 +106,28 @@ public:
const char* extraOptions = 0,
std::vector<std::string> const& nativeOptions =
std::vector<std::string>());
-
+
virtual std::string GenerateBuildCommand(
const char* makeProgram,
- const char *projectName, const char* additionalOptions,
+ const char *projectName, const char* additionalOptions,
const char *targetName,
const char* config, bool ignoreErrors, bool fast);
-
+
///! Set the CMake instance
void SetCMakeInstance(cmake *cm);
-
+
///! Get the CMake instance
cmake *GetCMakeInstance() { return this->CMakeInstance; };
void SetConfiguredFilesPath(cmGlobalGenerator* gen);
- const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
+ const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
return this->LocalGenerators;}
- cmLocalGenerator* GetCurrentLocalGenerator()
+ cmLocalGenerator* GetCurrentLocalGenerator()
{return this->CurrentLocalGenerator;}
- void SetCurrentLocalGenerator(cmLocalGenerator* lg)
+ void SetCurrentLocalGenerator(cmLocalGenerator* lg)
{this->CurrentLocalGenerator = lg;}
void AddLocalGenerator(cmLocalGenerator *lg);
@@ -139,11 +140,11 @@ public:
void AddInstallComponent(const char* component);
- const std::set<cmStdString>* GetInstallComponents() const
+ const std::set<cmStdString>* GetInstallComponents() const
{ return &InstallComponents; }
///! Add one installed target to the sets of the exports
- void AddTargetToExports(const char* exportSet, cmTarget* target,
+ void AddTargetToExports(const char* exportSet, cmTarget* target,
cmInstallTargetGenerator* archive,
cmInstallTargetGenerator* runTime,
cmInstallTargetGenerator* library,
@@ -159,10 +160,9 @@ public:
void EnableInstallTarget();
int TryCompileTimeout;
-
+
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
- void SetToolSupportsColor(bool enable) { this->ToolSupportsColor = enable; }
///! return the language for the given extension
const char* GetLanguageFromExtension(const char* ext);
@@ -235,11 +235,11 @@ public:
virtual const char* GetCleanTargetName() { return 0; }
// Class to track a set of dependencies.
- class TargetDependSet: public std::set<cmTarget*> {};
+ typedef cmTargetDependSet TargetDependSet;
// what targets does the specified target depend on directly
// via a target_link_libraries or add_dependencies
- TargetDependSet & GetTargetDirectDepends(cmTarget & target);
+ TargetDependSet const& GetTargetDirectDepends(cmTarget & target);
const std::map<cmStdString, std::vector<cmLocalGenerator*> >& GetProjectMap()
const {return this->ProjectMap;}
@@ -255,7 +255,7 @@ public:
bool BinaryDirectoryIsNew(const char* dir)
{
return this->BinaryDirectories.insert(dir).second;
- }
+ }
/** Supported systems creates a GUID for the given name */
virtual void CreateGUID(const char*) {}
@@ -276,11 +276,13 @@ protected:
void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
void FillExtensionToLanguageMap(const char* l, cmMakefile* mf);
+ virtual bool ComputeTargetDepends();
+
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS();
bool CheckTargets();
- // Fill the ProjectMap, this must be called after LocalGenerators
+ // Fill the ProjectMap, this must be called after LocalGenerators
// has been populated.
void FillProjectMap();
void CheckLocalGenerators();
@@ -290,8 +292,7 @@ protected:
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines,
- std::vector<std::string> depends, const char* workingDir,
- bool depends_on_all = false);
+ std::vector<std::string> depends, const char* workingDir);
bool NeedSymbolicMark;
bool UseLinkScript;
@@ -321,18 +322,21 @@ protected:
// All targets in the entire project.
std::map<cmStdString,cmTarget *> TotalTargets;
+ virtual const char* GetPredefinedTargetsFolder();
+ virtual bool UseFolderProperty();
+
private:
cmMakefile* TryCompileOuterMakefile;
float FirstTimeProgress;
// If you add a new map here, make sure it is copied
- // in EnableLanguagesFromGenerator
+ // in EnableLanguagesFromGenerator
std::map<cmStdString, bool> IgnoreExtensions;
std::map<cmStdString, bool> LanguageEnabled;
std::set<cmStdString> LanguagesReady; // Ready for try_compile
std::map<cmStdString, cmStdString> OutputExtensions;
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
std::map<cmStdString, cmStdString> ExtensionToLanguage;
- std::map<cmStdString, int> LanguageToLinkerPreference;
+ std::map<cmStdString, int> LanguageToLinkerPreference;
// Record hashes for rules and outputs.
struct RuleHash { char Data[32]; };