summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-24 22:13:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-10 09:04:39 (GMT)
commitbbef3c2da83b7a69d1f99b21dc92d5506d98fb35 (patch)
tree0648ee647358365e2fa3e3957aaa7271f831126c /Source/cmExtraCodeBlocksGenerator.cxx
parent12cb3bdce4b40c39b8697bbf89ea8aace6aeae8b (diff)
downloadCMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.zip
CMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.tar.gz
CMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.tar.bz2
cmLocalGenerator: Add current binary directory accessor.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index b7ada2f..c9d0ce2 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -76,8 +76,7 @@ void cmExtraCodeBlocksGenerator::Generate()
void cmExtraCodeBlocksGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator*>& lgs)
{
- const cmMakefile* mf=lgs[0]->GetMakefile();
- std::string outputDir=mf->GetCurrentBinaryDirectory();
+ std::string outputDir=lgs[0]->GetCurrentBinaryDirectory();
std::string projectName=lgs[0]->GetProjectName();
std::string filename=outputDir+"/";
@@ -331,7 +330,7 @@ void cmExtraCodeBlocksGenerator
{
// Only add the global targets from CMAKE_BINARY_DIR,
// not from the subdirs
- if (strcmp(makefile->GetCurrentBinaryDirectory(),
+ if (strcmp((*lg)->GetCurrentBinaryDirectory(),
(*lg)->GetBinaryDirectory())==0)
{
this->AppendTarget(fout, ti->first, 0,
@@ -524,11 +523,10 @@ std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
cmLocalGenerator* lg,
cmTarget* target) const
{
- cmMakefile *mf = lg->GetMakefile();
// this file doesn't seem to be used by C::B in custom makefile mode,
// but we generate a unique file for each OBJECT library so in case
// C::B uses it in some way, the targets don't interfere with each other.
- std::string filename = mf->GetCurrentBinaryDirectory();
+ std::string filename = lg->GetCurrentBinaryDirectory();
filename += "/";
filename += lg->GetTargetDirectory(*target);
filename += "/";
@@ -555,14 +553,14 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
const char* compiler)
{
cmMakefile const* makefile = lg->GetMakefile();
- std::string makefileName = makefile->GetCurrentBinaryDirectory();
+ std::string makefileName = lg->GetCurrentBinaryDirectory();
makefileName += "/Makefile";
fout<<" <Target title=\"" << targetName << "\">\n";
if (target!=0)
{
int cbTargetType = this->GetCBTargetType(target);
- std::string workingDir = makefile->GetCurrentBinaryDirectory();
+ std::string workingDir = lg->GetCurrentBinaryDirectory();
if ( target->GetType()==cmTarget::EXECUTABLE)
{
// Determine the directory where the executable target is created, and
@@ -659,7 +657,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
else // e.g. all and the GLOBAL and UTILITY targets
{
fout<<" <Option working_dir=\""
- << makefile->GetCurrentBinaryDirectory() << "\" />\n"
+ << lg->GetCurrentBinaryDirectory() << "\" />\n"
<<" <Option type=\"" << 4 << "\" />\n";
}