|
|
@@ -30,7 +30,6 @@
|
|
|
#include "cmGeneratedFileStream.h"
|
|
|
#include "cmGeneratorTarget.h"
|
|
|
#include "cmGeneratorExpression.h"
|
|
|
-#include "cmGeneratorExpressionEvaluationFile.h"
|
|
|
#include "cmExportBuildFileGenerator.h"
|
|
|
#include "cmCPackPropertiesGenerator.h"
|
|
|
#include "cmAlgorithms.h"
|
|
|
@@ -1561,9 +1560,6 @@ void cmGlobalGenerator::ClearGeneratorMembers()
|
|
|
cmDeleteAll(this->GeneratorTargets);
|
|
|
this->GeneratorTargets.clear();
|
|
|
|
|
|
- cmDeleteAll(this->EvaluationFiles);
|
|
|
- this->EvaluationFiles.clear();
|
|
|
-
|
|
|
cmDeleteAll(this->BuildExportSets);
|
|
|
this->BuildExportSets.clear();
|
|
|
|
|
|
@@ -3032,61 +3028,21 @@ cmGlobalGenerator::GetFilenameTargetDepends(cmSourceFile* sf) const {
|
|
|
void cmGlobalGenerator::CreateEvaluationSourceFiles(
|
|
|
std::string const& config) const
|
|
|
{
|
|
|
- for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
|
|
|
- li = this->EvaluationFiles.begin();
|
|
|
- li != this->EvaluationFiles.end();
|
|
|
- ++li)
|
|
|
+ unsigned int i;
|
|
|
+ for (i = 0; i < this->LocalGenerators.size(); ++i)
|
|
|
{
|
|
|
- (*li)->CreateOutputFile(config);
|
|
|
+ this->LocalGenerators[i]->CreateEvaluationFileOutputs(config);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//----------------------------------------------------------------------------
|
|
|
-void cmGlobalGenerator::AddEvaluationFile(const std::string &inputFile,
|
|
|
- cmsys::auto_ptr<cmCompiledGeneratorExpression> outputExpr,
|
|
|
- cmMakefile *makefile,
|
|
|
- cmsys::auto_ptr<cmCompiledGeneratorExpression> condition,
|
|
|
- bool inputIsContent)
|
|
|
-{
|
|
|
- this->EvaluationFiles.push_back(
|
|
|
- new cmGeneratorExpressionEvaluationFile(inputFile, outputExpr,
|
|
|
- makefile, condition,
|
|
|
- inputIsContent));
|
|
|
-}
|
|
|
-
|
|
|
//----------------------------------------------------------------------------
|
|
|
void cmGlobalGenerator::ProcessEvaluationFiles()
|
|
|
{
|
|
|
std::vector<std::string> generatedFiles;
|
|
|
- for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
|
|
|
- li = this->EvaluationFiles.begin();
|
|
|
- li != this->EvaluationFiles.end();
|
|
|
- ++li)
|
|
|
+ unsigned int i;
|
|
|
+ for (i = 0; i < this->LocalGenerators.size(); ++i)
|
|
|
{
|
|
|
- (*li)->Generate();
|
|
|
- if (cmSystemTools::GetFatalErrorOccured())
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- std::vector<std::string> files = (*li)->GetFiles();
|
|
|
- std::sort(files.begin(), files.end());
|
|
|
-
|
|
|
- std::vector<std::string> intersection;
|
|
|
- std::set_intersection(files.begin(), files.end(),
|
|
|
- generatedFiles.begin(), generatedFiles.end(),
|
|
|
- std::back_inserter(intersection));
|
|
|
- if (!intersection.empty())
|
|
|
- {
|
|
|
- cmSystemTools::Error("Files to be generated by multiple different "
|
|
|
- "commands: ", cmWrap('"', intersection, '"', " ").c_str());
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- generatedFiles.insert(generatedFiles.end(),
|
|
|
- files.begin(), files.end());
|
|
|
- std::vector<std::string>::iterator newIt =
|
|
|
- generatedFiles.end() - files.size();
|
|
|
- std::inplace_merge(generatedFiles.begin(), newIt, generatedFiles.end());
|
|
|
+ this->LocalGenerators[i]->ProcessEvaluationFiles(generatedFiles);
|
|
|
}
|
|
|
}
|
|
|
|