Browse Source

cmGlobalXCodeGenerator: Simplify ARCHS list with cmJoin

Brad King 10 years ago
parent
commit
9e14a5dee2
1 changed files with 2 additions and 10 deletions
  1. 2 10
      Source/cmGlobalXCodeGenerator.cxx

+ 2 - 10
Source/cmGlobalXCodeGenerator.cxx

@@ -21,6 +21,7 @@
 #include "cmCustomCommandGenerator.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGeneratorFactory.h"
+#include "cmAlgorithms.h"
 
 #include <cmsys/auto_ptr.hxx>
 
@@ -3415,16 +3416,7 @@ bool cmGlobalXCodeGenerator
                                       this->Architectures);
     buildSettings->AddAttribute("SDKROOT",
                                 this->CreateString(sysroot));
-    std::string archString;
-    const char* sep = "";
-    for( std::vector<std::string>::iterator i =
-           this->Architectures.begin();
-         i != this->Architectures.end(); ++i)
-      {
-      archString += sep;
-      archString += *i;
-      sep = " ";
-      }
+    std::string const& archString = cmJoin(this->Architectures, " ");
     buildSettings->AddAttribute("ARCHS",
                                 this->CreateString(archString.c_str()));
     }