summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-10-31 22:37:01 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-10-31 22:37:01 (GMT)
commit057633151a527fc614b56f4ca3fd73f63928ebff (patch)
tree35cc209b0d71def5e98a6c038ab04246dcd7101f /Source/cmExtraEclipseCDT4Generator.cxx
parent07e88ae4499b632222367eb5b4308cac2a89718f (diff)
downloadCMake-057633151a527fc614b56f4ca3fd73f63928ebff.zip
CMake-057633151a527fc614b56f4ca3fd73f63928ebff.tar.gz
CMake-057633151a527fc614b56f4ca3fd73f63928ebff.tar.bz2
Eclipse: make targets work from any directory
Set the working directory for make targets which are associated to virtual folders, otherwise Eclipse simply runs make from the current working directory (where Eclipse has been started), and where probably not the correct makefile is located. Alex
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 785e85a..eab149e 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -998,7 +998,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
std::string virtDir = "[Targets]/";
virtDir += prefix;
virtDir += ti->first;
- this->AppendTarget(fout, "Build", make, makeArgs, virtDir, "",
+ std::string buildArgs = "-C ";
+ buildArgs += makefile->GetHomeOutputDirectory();
+ buildArgs += " ";
+ buildArgs += makeArgs;
+ this->AppendTarget(fout, "Build", make, buildArgs, virtDir, "",
ti->first.c_str());
std::string cleanArgs = "-E chdir \"";