summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-16 18:04:08 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-16 18:04:08 (GMT)
commit1c17dcd9698faa9c8a96420b4856e5c6a356888b (patch)
tree8209d406ff6d58e4b395b3810163f4db061dfdde
parent73a1f4c6e8c27e0d9b9f7c76c2a86d8a02ff09cf (diff)
downloadCMake-1c17dcd9698faa9c8a96420b4856e5c6a356888b.zip
CMake-1c17dcd9698faa9c8a96420b4856e5c6a356888b.tar.gz
CMake-1c17dcd9698faa9c8a96420b4856e5c6a356888b.tar.bz2
ENH: move changes from main tree to branch
-rw-r--r--ChangeLog.manual5
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx38
-rw-r--r--Source/cmGlobalXCodeGenerator.h1
-rw-r--r--Source/cmListCommand.cxx3
-rw-r--r--Source/cmListCommand.h7
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx6
7 files changed, 49 insertions, 13 deletions
diff --git a/ChangeLog.manual b/ChangeLog.manual
index 80eb39c..c7a8e17 100644
--- a/ChangeLog.manual
+++ b/ChangeLog.manual
@@ -1,4 +1,9 @@
Changes in CMake 2.4.2
+
+* Run symlink command from correct directory for executable versions
+
+* Fix for universal binaries and Xcode depend problem
+
* Changes to LIST command, see --help-command LIST
* Fix FindQT to be able to use full paths to source files
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index fea2193..d48723f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2145,16 +2145,17 @@ void cmGlobalXCodeGenerator
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
if(osxArch && sysroot)
{
- std::vector<std::string> archs;
+ this->Architectures.clear();
cmSystemTools::ExpandListArgument(std::string(osxArch),
- archs);
- if(archs.size() > 1)
+ this->Architectures);
+ if(this->Architectures.size() > 1)
{
buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
std::string archString;
- for( std::vector<std::string>::iterator i = archs.begin();
- i != archs.end(); ++i)
+ for( std::vector<std::string>::iterator i =
+ this->Architectures.begin();
+ i != this->Architectures.end(); ++i)
{
archString += *i;
archString += " ";
@@ -2326,12 +2327,37 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
this->ConvertToRelativeForMake(d->c_str());
}
}
-
// Write the action to remove the target if it is out of date.
makefileStream << "\n";
makefileStream << "\t/bin/rm -f "
<< this->ConvertToRelativeForMake(tfull.c_str())
<< "\n";
+ // if building for more than one architecture
+ // then remove those exectuables as well
+ if(this->Architectures.size() > 1)
+ {
+ std::string universal = t->GetDirectory();
+ universal += "/";
+ universal += this->CurrentMakefile->GetProjectName();
+ universal += ".build/";
+ universal += configName;
+ universal += "/";
+ universal += t->GetName();
+ universal += ".build/Objects-normal/";
+ for( std::vector<std::string>::iterator arch =
+ this->Architectures.begin();
+ arch != this->Architectures.end(); ++arch)
+ {
+ std::string universalFile = universal;
+ universalFile += *arch;
+ universalFile += "/";
+ universalFile += t->GetName();
+ makefileStream << "\t/bin/rm -f "
+ <<
+ this->ConvertToRelativeForMake(universalFile.c_str())
+ << "\n";
+ }
+ }
makefileStream << "\n\n";
}
}
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 669942a..326bfd0 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -182,6 +182,7 @@ private:
std::map<cmSourceFile*, cmXCodeObject* > GroupMap;
std::map<cmStdString, cmXCodeObject* > GroupNameMap;
std::map<cmStdString, cmXCodeObject* > TargetGroup;
+ std::vector<std::string> Architectures;
};
#endif
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 88705b7..99e3ac3 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -299,7 +299,8 @@ bool cmListCommand
}
//----------------------------------------------------------------------------
-bool cmListCommand::HandleRemoveAtCommand(std::vector<std::string> const& args)
+bool cmListCommand::HandleRemoveAtCommand(
+ std::vector<std::string> const& args)
{
if(args.size() < 3)
{
diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h
index c15a054..129f045 100644
--- a/Source/cmListCommand.h
+++ b/Source/cmListCommand.h
@@ -79,10 +79,9 @@ public:
"INSERT will insert elements to the list to the specified location.\n"
"When specifying an index, negative value corresponds to index from the"
" end of the list.\n"
- "REMOVE_AT and REMOVE_ITEM will remove item from the list. "
- "The difference "
- "is that REMOVE_ITEM will remove the given items, while REMOVE_AT will "
- "remove the item at the given indices.\n"
+ "REMOVE_AT and REMOVE_ITEM will remove item from the list. The "
+ "difference is that REMOVE_ITEM will remove the given items, while "
+ "REMOVE_AT will remove the item at the given indices.\n"
;
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 6074e68..95bf9aa 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1413,8 +1413,6 @@ void cmLocalUnixMakefileGenerator3
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
- std::string echoCommand = "@echo \"\"";
- commands.push_back(echoCommand.c_str());
this->WriteMakeRule(ruleFileStream, "The main all target", "all",
depends, commands, true);
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 0f36f0d..c999106 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -312,6 +312,12 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
symlink += " ";
symlink += targetOutPath;
commands.push_back(symlink);
+ commands1.clear();
+ commands1.push_back(symlink);
+ this->LocalGenerator->CreateCDCommand(commands1,
+ this->Makefile->GetStartOutputDirectory(),
+ this->Makefile->GetHomeOutputDirectory());
+ commands.insert(commands.end(), commands1.begin(), commands1.end());
}
// Add the post-build rules when building but not when relinking.