[Cmake-commits] [cmake-commits] king committed cmGlobalGenerator.cxx 1.259 1.260 cmGlobalGenerator.h 1.126 1.127 cmGlobalVisualStudio6Generator.cxx 1.80 1.81 cmGlobalVisualStudio71Generator.cxx 1.55 1.56 cmGlobalVisualStudio7Generator.cxx 1.110 1.111
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Oct 1 10:26:56 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1651/Source
Modified Files:
cmGlobalGenerator.cxx cmGlobalGenerator.h
cmGlobalVisualStudio6Generator.cxx
cmGlobalVisualStudio71Generator.cxx
cmGlobalVisualStudio7Generator.cxx
Log Message:
Cleanup cmGlobalGenerator::GetTargetSets method
This commit cleans up the declaration, definition, and invocations of
the GetTargetSets method and related code. There is no change in
function except to make the method virtual.
Index: cmGlobalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio6Generator.cxx,v
retrieving revision 1.80
retrieving revision 1.81
diff -C 2 -d -r1.80 -r1.81
*** cmGlobalVisualStudio6Generator.cxx 30 Sep 2009 20:03:03 -0000 1.80
--- cmGlobalVisualStudio6Generator.cxx 1 Oct 2009 14:26:54 -0000 1.81
***************
*** 190,198 ****
// Collect all targets under this root generator and the transitive
// closure of their dependencies.
! cmGlobalGenerator::TargetDependSet projectTargets;
! cmGlobalGenerator::TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets,
! originalTargets,
! root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
--- 190,196 ----
// Collect all targets under this root generator and the transitive
// closure of their dependencies.
! TargetDependSet projectTargets;
! TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.259
retrieving revision 1.260
diff -C 2 -d -r1.259 -r1.260
*** cmGlobalGenerator.cxx 30 Sep 2009 15:41:34 -0000 1.259
--- cmGlobalGenerator.cxx 1 Oct 2009 14:26:54 -0000 1.260
***************
*** 1932,1941 ****
}
! void
! cmGlobalGenerator
! ::GetTargetSets(cmGlobalGenerator::TargetDependSet& projectTargets,
! cmGlobalGenerator::TargetDependSet& originalTargets,
! cmLocalGenerator* root,
! std::vector<cmLocalGenerator*> const& generators)
{
// loop over all local generators
--- 1932,1940 ----
}
! //----------------------------------------------------------------------------
! void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
! TargetDependSet& originalTargets,
! cmLocalGenerator* root,
! GeneratorVector const& generators)
{
// loop over all local generators
***************
*** 1950,1954 ****
cmMakefile* mf = (*i)->GetMakefile();
// Get the targets in the makefile
! cmTargets &tgts = mf->GetTargets();
// loop over all the targets
for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
--- 1949,1953 ----
cmMakefile* mf = (*i)->GetMakefile();
// Get the targets in the makefile
! cmTargets &tgts = mf->GetTargets();
// loop over all the targets
for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
***************
*** 1958,1971 ****
originalTargets.insert(target);
// Get the set of targets that depend on target
! this->AddTargetDepends(target,
! projectTargets);
}
}
}
!
! void
! cmGlobalGenerator::AddTargetDepends(cmTarget* target,
! cmGlobalGenerator::TargetDependSet&
! projectTargets)
{
// add the target itself
--- 1957,1968 ----
originalTargets.insert(target);
// Get the set of targets that depend on target
! this->AddTargetDepends(target, projectTargets);
}
}
}
!
! //----------------------------------------------------------------------------
! void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
! TargetDependSet& projectTargets)
{
// add the target itself
***************
*** 1974,1981 ****
// This is the first time we have encountered the target.
// Recursively follow its dependencies.
! cmGlobalGenerator::TargetDependSet const& tset
! = this->GetTargetDirectDepends(*target);
! for(cmGlobalGenerator::TargetDependSet::const_iterator i =
! tset.begin(); i != tset.end(); ++i)
{
cmTarget* dtarget = *i;
--- 1971,1976 ----
// This is the first time we have encountered the target.
// Recursively follow its dependencies.
! TargetDependSet const& ts = this->GetTargetDirectDepends(*target);
! for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i)
{
cmTarget* dtarget = *i;
Index: cmGlobalVisualStudio71Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio71Generator.cxx,v
retrieving revision 1.55
retrieving revision 1.56
diff -C 2 -d -r1.55 -r1.56
*** cmGlobalVisualStudio71Generator.cxx 28 Sep 2009 15:42:41 -0000 1.55
--- cmGlobalVisualStudio71Generator.cxx 1 Oct 2009 14:26:54 -0000 1.56
***************
*** 101,115 ****
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
!
! // collect the set of targets for this project by
! // tracing depends of all targets.
! // also collect the set of targets that are explicitly
! // in this project.
! cmGlobalGenerator::TargetDependSet projectTargets;
! cmGlobalGenerator::TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets,
! originalTargets,
! root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
// Write out the configurations information for the solution
--- 101,112 ----
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
!
! // Collect all targets under this root generator and the transitive
! // closure of their dependencies.
! TargetDependSet projectTargets;
! TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
+
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
// Write out the configurations information for the solution
Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.110
retrieving revision 1.111
diff -C 2 -d -r1.110 -r1.111
*** cmGlobalVisualStudio7Generator.cxx 30 Sep 2009 20:02:58 -0000 1.110
--- cmGlobalVisualStudio7Generator.cxx 1 Oct 2009 14:26:54 -0000 1.111
***************
*** 353,367 ****
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
!
! // collect the set of targets for this project by
! // tracing depends of all targets.
! // also collect the set of targets that are explicitly
! // in this project.
! cmGlobalGenerator::TargetDependSet projectTargets;
! cmGlobalGenerator::TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets,
! originalTargets,
! root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
// Write out the configurations information for the solution
--- 353,364 ----
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
!
! // Collect all targets under this root generator and the transitive
! // closure of their dependencies.
! TargetDependSet projectTargets;
! TargetDependSet originalTargets;
! this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
+
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
// Write out the configurations information for the solution
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.126
retrieving revision 1.127
diff -C 2 -d -r1.126 -r1.127
*** cmGlobalGenerator.h 28 Sep 2009 15:42:41 -0000 1.126
--- cmGlobalGenerator.h 1 Oct 2009 14:26:54 -0000 1.127
***************
*** 260,272 ****
protected:
// for a project collect all its targets by following depend
// information, and also collect all the targets
! void GetTargetSets(cmGlobalGenerator::TargetDependSet& projectTargets,
! cmGlobalGenerator::TargetDependSet& originalTargets,
! cmLocalGenerator* root,
! std::vector<cmLocalGenerator*> const& generators);
! void AddTargetDepends(cmTarget* target,
! cmGlobalGenerator::TargetDependSet&
! projectTargets);
void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);
void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
--- 260,270 ----
protected:
+ typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
// information, and also collect all the targets
! virtual void GetTargetSets(TargetDependSet& projectTargets,
! TargetDependSet& originalTargets,
! cmLocalGenerator* root, GeneratorVector const&);
! void AddTargetDepends(cmTarget* target, TargetDependSet& projectTargets);
void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);
void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
More information about the Cmake-commits
mailing list