summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-03-14 21:46:56 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-16 14:05:46 (GMT)
commit34e4985eed3589a4f7ad7dfc14a7a8aa10c8ff97 (patch)
tree1fe0bb5e461b06177bb11c0fcdf5f004bc4b5749 /Source
parent3a53005f7dd5e582b855ef1f3c0e6814ce7d024a (diff)
downloadCMake-34e4985eed3589a4f7ad7dfc14a7a8aa10c8ff97.zip
CMake-34e4985eed3589a4f7ad7dfc14a7a8aa10c8ff97.tar.gz
CMake-34e4985eed3589a4f7ad7dfc14a7a8aa10c8ff97.tar.bz2
Xcode: Re-factor code into GetObjectsNormalDirectory method
...in preparation for calling it from more than one location. Required to support OBJECT_LIBRARY targets in Xcode.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx31
-rw-r--r--Source/cmGlobalXCodeGenerator.h5
2 files changed, 27 insertions, 9 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index a6a9200..7660ffa 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3046,6 +3046,26 @@ void cmGlobalXCodeGenerator
}
//----------------------------------------------------------------------------
+std::string
+cmGlobalXCodeGenerator::GetObjectsNormalDirectory(
+ const std::string &projName,
+ const std::string &configName,
+ const cmTarget *t) const
+{
+ std::string dir =
+ t->GetMakefile()->GetCurrentOutputDirectory();
+ dir += "/";
+ dir += projName;
+ dir += ".build/";
+ dir += configName;
+ dir += "/";
+ dir += t->GetName();
+ dir += ".build/Objects-normal/";
+
+ return dir;
+}
+
+//----------------------------------------------------------------------------
void
cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
std::vector<cmXCodeObject*>& targets)
@@ -3169,15 +3189,8 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
// then remove those exectuables as well
if(this->Architectures.size() > 1)
{
- std::string universal =
- t->GetMakefile()->GetCurrentOutputDirectory();
- universal += "/";
- universal += this->CurrentProject;
- universal += ".build/";
- universal += configName;
- universal += "/";
- universal += t->GetName();
- universal += ".build/Objects-normal/";
+ std::string universal = this->GetObjectsNormalDirectory(
+ this->CurrentProject, configName, t);
for( std::vector<std::string>::iterator arch =
this->Architectures.begin();
arch != this->Architectures.end(); ++arch)
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index b9cf775..393cd47 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -200,6 +200,11 @@ protected:
std::vector<cmXCodeObject*> XCodeObjects;
cmXCodeObject* RootObject;
private:
+ std::string GetObjectsNormalDirectory(
+ const std::string &projName,
+ const std::string &configName,
+ const cmTarget *t) const;
+
void addObject(cmXCodeObject *obj);
std::string PostBuildMakeTarget(std::string const& tName,
std::string const& configName);