summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-06-25 13:58:51 (GMT)
committerBrad King <brad.king@kitware.com>2009-06-25 13:58:51 (GMT)
commitcd83f1979da5c2ed39e5824de70f2d84b8b1a4cc (patch)
tree4a19dcf2aa834fd8bfe4629dce874c17c4e05dca /Source/cmGlobalUnixMakefileGenerator3.h
parentb9a98ef65b2c586d593219256a05a09c71216eee (diff)
downloadCMake-cd83f1979da5c2ed39e5824de70f2d84b8b1a4cc.zip
CMake-cd83f1979da5c2ed39e5824de70f2d84b8b1a4cc.tar.gz
CMake-cd83f1979da5c2ed39e5824de70f2d84b8b1a4cc.tar.bz2
ENH: Cleanup make progress rule generation code
This cleans up the Makefile generator's progress rule code. Instead of keeping every cmMakefileTargetGenerator instance alive to generate progress, we keep only the information necessary in a single table. This approach keeps most of the code in cmGlobalUnixMakefileGenerator3, thus simplifying its public interface.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.h')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 5cfe26f..d21b3e8 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -20,6 +20,7 @@
#include "cmGlobalGenerator.h"
class cmGeneratedFileStream;
+class cmMakefileTargetGenerator;
class cmLocalUnixMakefileGenerator3;
/** \class cmGlobalUnixMakefileGenerator3
@@ -113,11 +114,8 @@ public:
const char *targetName,
const char* config, bool ignoreErrors, bool fast);
- // returns some progress informaiton
- int GetTargetTotalNumberOfActions(cmTarget & target,
- std::set<cmTarget *> &emitted);
- unsigned long GetNumberOfProgressActionsInAll
- (cmLocalUnixMakefileGenerator3 *lg);
+ /** Record per-target progress information. */
+ void RecordTargetProgress(cmMakefileTargetGenerator* tg);
/**
* If true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have effect
@@ -177,6 +175,22 @@ protected:
std::string EmptyRuleHackCommand;
bool ForceVerboseMakefiles;
+
+ // Store per-target progress counters.
+ struct TargetProgress
+ {
+ TargetProgress(): NumberOfActions(0) {}
+ unsigned long NumberOfActions;
+ std::string VariableFile;
+ std::vector<int> Marks;
+ void WriteProgressVariables(unsigned long total, unsigned long& current);
+ };
+ typedef std::map<cmStdString, TargetProgress> ProgressMapType;
+ ProgressMapType ProgressMap;
+
+ size_t CountProgressMarksInTarget(cmTarget* target,
+ std::set<cmTarget*>& emitted);
+ size_t CountProgressMarksInAll(cmLocalUnixMakefileGenerator3* lg);
};
#endif