[cmake-commits] alex committed cmGlobalVisualStudio6Generator.cxx 1.67 1.67.4.1 cmGlobalVisualStudio7Generator.cxx 1.85 1.85.4.1 cmGlobalXCodeGenerator.cxx 1.142.4.1 1.142.4.2 cmGlobalGenerator.cxx 1.173 1.173.4.1

cmake-commits at cmake.org cmake-commits at cmake.org
Tue May 8 14:28:33 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8642

Modified Files:
      Tag: CMake-ACC-TargetUsedAsCommand
	cmGlobalVisualStudio6Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx cmGlobalXCodeGenerator.cxx 
	cmGlobalGenerator.cxx 
Log Message:

STYLE: standard for-loop-initialization in the MSVC generator, one level
less deep if-statement in XCode generator, one level less deep function call
in the global generator -> makes it easier to understand IMO

Alex


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.142.4.1
retrieving revision 1.142.4.2
diff -u -d -r1.142.4.1 -r1.142.4.2
--- cmGlobalXCodeGenerator.cxx	4 May 2007 20:43:29 -0000	1.142.4.1
+++ cmGlobalXCodeGenerator.cxx	8 May 2007 18:28:31 -0000	1.142.4.2
@@ -577,16 +577,18 @@
       {
       continue;
       }
+
+    if(cmtarget.GetType() == cmTarget::UTILITY ||
+       cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
+      {
+      targets.push_back(this->CreateUtilityTarget(cmtarget));
+      }
+
     if(cmtarget.GetType() == cmTarget::UTILITY ||
        cmtarget.GetType() == cmTarget::GLOBAL_TARGET ||
        cmtarget.GetType() == cmTarget::INSTALL_FILES ||
        cmtarget.GetType() == cmTarget::INSTALL_PROGRAMS)
       {
-      if(cmtarget.GetType() == cmTarget::UTILITY ||
-         cmtarget.GetType() == cmTarget::GLOBAL_TARGET)
-        {
-        targets.push_back(this->CreateUtilityTarget(cmtarget));
-        }
       continue;
       }
 

Index: cmGlobalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio6Generator.cxx,v
retrieving revision 1.67
retrieving revision 1.67.4.1
diff -u -d -r1.67 -r1.67.4.1
--- cmGlobalVisualStudio6Generator.cxx	10 Apr 2007 17:09:03 -0000	1.67
+++ cmGlobalVisualStudio6Generator.cxx	8 May 2007 18:28:30 -0000	1.67.4.1
@@ -208,9 +208,8 @@
       static_cast<cmLocalVisualStudio6Generator *>(generators[i])
       ->GetCreatedProjectNames();
     cmTargets &tgts = generators[i]->GetMakefile()->GetTargets();
-    cmTargets::iterator l = tgts.begin();
-    for(std::vector<std::string>::iterator si = dspnames.begin(); 
-        l != tgts.end(); ++l)
+    std::vector<std::string>::iterator si = dspnames.begin(); 
+    for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
       {
       // special handling for the current makefile
       if(mf == generators[0]->GetMakefile())

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.173
retrieving revision 1.173.4.1
diff -u -d -r1.173 -r1.173.4.1
--- cmGlobalGenerator.cxx	24 Apr 2007 16:30:25 -0000	1.173
+++ cmGlobalGenerator.cxx	8 May 2007 18:28:31 -0000	1.173.4.1
@@ -718,6 +718,11 @@
   // at this point this->LocalGenerators has been filled,
   // so create the map from project name to vector of local generators
   this->FillProjectMap();
+  // now create project to target map 
+  // This will make sure that targets have all the 
+  // targets they depend on as part of the build.
+  this->FillProjectToTargetMap();
+
   if ( !this->CMakeInstance->GetScriptMode() )
     {
     this->CMakeInstance->UpdateProgress("Configuring done", -1);
@@ -1057,10 +1062,6 @@
       }
     while (lg);
     }
-  // now create project to target map 
-  // This will make sure that targets have all the 
-  // targets they depend on as part of the build.
-  this->FillProjectToTargetMap();
 }
 
 

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.85
retrieving revision 1.85.4.1
diff -u -d -r1.85 -r1.85.4.1
--- cmGlobalVisualStudio7Generator.cxx	10 Apr 2007 17:09:03 -0000	1.85
+++ cmGlobalVisualStudio7Generator.cxx	8 May 2007 18:28:31 -0000	1.85.4.1
@@ -294,8 +294,7 @@
     // than one dsp could have been created per input CMakeLists.txt file
     // for each target
     cmTargets &tgts = generators[i]->GetMakefile()->GetTargets();
-    cmTargets::iterator l = tgts.begin();
-    for(; l != tgts.end(); ++l)
+    for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
       {
       // special handling for the current makefile
       if(mf == generators[0]->GetMakefile())



More information about the Cmake-commits mailing list