diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-07 01:17:48 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-09 00:00:19 +0200 |
commit | 12cb3bdce4b40c39b8697bbf89ea8aace6aeae8b (patch) | |
tree | 22424e05eb3914000b2eb8f95cad7a55c13ef127 /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | 72efa15dc26b5f63a477ec537edfdffb54ecb691 (diff) | |
download | cmake-12cb3bdce4b40c39b8697bbf89ea8aace6aeae8b.tar.gz |
cmLocalGenerator: Add Home directory accessors.
Reduce reasons for cmLocalGenerator to have a cmMakefile.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index a98eef19f6..47e25665b3 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -79,8 +79,8 @@ void cmExtraEclipseCDT4Generator //---------------------------------------------------------------------------- void cmExtraEclipseCDT4Generator::Generate() { - const cmMakefile* mf - = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + cmLocalGenerator* lg = this->GlobalGenerator->GetLocalGenerators()[0]; + const cmMakefile* mf = lg->GetMakefile(); std::string eclipseVersion = mf->GetSafeDefinition("CMAKE_ECLIPSE_VERSION"); cmsys::RegularExpression regex(".*([0-9]+\\.[0-9]+).*"); @@ -106,8 +106,8 @@ void cmExtraEclipseCDT4Generator::Generate() } // TODO: Decide if these are local or member variables - this->HomeDirectory = mf->GetHomeDirectory(); - this->HomeOutputDirectory = mf->GetHomeOutputDirectory(); + this->HomeDirectory = lg->GetSourceDirectory(); + this->HomeOutputDirectory = lg->GetBinaryDirectory(); this->GenerateLinkedResources = mf->IsOn( "CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES"); @@ -226,7 +226,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout, mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), cacheEntryName.c_str(), cmState::STRING, true); - mf->GetCMakeInstance()->SaveCache(mf->GetHomeOutputDirectory()); + mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } else if (envVarValue==0 && cacheValue!=0) { @@ -247,7 +247,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout, mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(), cacheEntryName.c_str(), cmState::STRING, true); - mf->GetCMakeInstance()->SaveCache(mf->GetHomeOutputDirectory()); + mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory()); } } @@ -1091,7 +1091,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const virtDir += prefix; virtDir += ti->first; std::string buildArgs = "-C \""; - buildArgs += makefile->GetHomeOutputDirectory(); + buildArgs += (*it)->GetBinaryDirectory(); buildArgs += "\" "; buildArgs += makeArgs; this->AppendTarget(fout, "Build", make, buildArgs, virtDir, "", |