summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-27 19:39:55 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-27 19:39:55 (GMT)
commitdd2f81491e6e17681dd18882a8ccfa01fa32a3f7 (patch)
tree6b782de32aeb462333d70747f269b1725e723e00 /Source/cmGlobalGenerator.cxx
parent949d32c3067830a1376950fc78dbcde39bc378a8 (diff)
parent7679f9fab099e729b61320927a9e0b8d03546f7f (diff)
downloadCMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.zip
CMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.tar.gz
CMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.tar.bz2
Merge branch 'dev/add_test-working-directory' into dev/strict-mode
Conflicts: Tests/CMakeLists.txt
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx27
1 files changed, 4 insertions, 23 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 789d0e7..2ae1c93 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -699,9 +699,8 @@ bool cmGlobalGenerator::IsDependedOn(const char* project,
l != targets.end(); l++)
{
cmTarget& target = l->second;
- std::set<cmStdString>::const_iterator pos =
- target.GetUtilities().find(targetIn->GetName());
- if(pos != target.GetUtilities().end())
+ TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
+ if(tgtdeps.count(targetIn))
{
return true;
}
@@ -815,24 +814,11 @@ void cmGlobalGenerator::Generate()
// For each existing cmLocalGenerator
unsigned int i;
- // Consolidate global targets
+ // Put a copy of each global target in every directory.
cmTargets globalTargets;
this->CreateDefaultGlobalTargets(&globalTargets);
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
- cmTargets* targets =
- &(this->LocalGenerators[i]->GetMakefile()->GetTargets());
- cmTargets::iterator tarIt;
- for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt )
- {
- if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET )
- {
- globalTargets[tarIt->first] = tarIt->second;
- }
- }
- }
- for (i = 0; i < this->LocalGenerators.size(); ++i)
- {
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
cmTargets* targets = &(mf->GetTargets());
cmTargets::iterator tit;
@@ -1884,8 +1870,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
const char* name, const char* message,
const cmCustomCommandLines* commandLines,
std::vector<std::string> depends,
- const char* workingDirectory,
- bool depends_on_all /* = false */)
+ const char* workingDirectory)
{
// Package
cmTarget target;
@@ -1900,10 +1885,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
workingDirectory);
target.GetPostBuildCommands().push_back(cc);
target.SetProperty("EchoString", message);
- if ( depends_on_all )
- {
- target.AddUtility("all");
- }
std::vector<std::string>::iterator dit;
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
{