diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index f901414fc..06838fd61 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -403,7 +403,7 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const cmMakefile* mf = linkee->Target->GetMakefile(); std::string di = mf->GetCurrentBinaryDirectory(); di += "/"; - di += lg->GetTargetDirectory(*linkee->Target); + di += lg->GetTargetDirectory(linkee); dirs.push_back(di); } } diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 0406644b4..cdb4d8b00 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -358,11 +358,13 @@ void cmExtraCodeBlocksGenerator case cmTarget::MODULE_LIBRARY: case cmTarget::OBJECT_LIBRARY: { - this->AppendTarget(fout, ti->first, &ti->second, + cmGeneratorTarget* gt = + this->GlobalGenerator->GetGeneratorTarget(&ti->second); + this->AppendTarget(fout, ti->first, gt, make.c_str(), *lg, compiler.c_str()); std::string fastTarget = ti->first; fastTarget += "/fast"; - this->AppendTarget(fout, fastTarget, &ti->second, + this->AppendTarget(fout, fastTarget, gt, make.c_str(), *lg, compiler.c_str()); } break; @@ -521,14 +523,14 @@ void cmExtraCodeBlocksGenerator // Write a dummy file for OBJECT libraries, so C::B can reference some file std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile( cmLocalGenerator* lg, - cmTarget* target) const + cmGeneratorTarget* target) const { // 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 = lg->GetCurrentBinaryDirectory(); filename += "/"; - filename += lg->GetTargetDirectory(*target); + filename += lg->GetTargetDirectory(target); filename += "/"; filename += target->GetName(); filename += ".objlib"; @@ -547,7 +549,7 @@ std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile( // Generate the xml code for one target. void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, const std::string& targetName, - cmTarget* target, + cmGeneratorTarget* target, const char* make, const cmLocalGenerator* lg, const char* compiler) @@ -559,7 +561,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, fout<<" \n"; if (target!=0) { - int cbTargetType = this->GetCBTargetType(target); + int cbTargetType = this->GetCBTargetType(target->Target); std::string workingDir = lg->GetCurrentBinaryDirectory(); if ( target->GetType()==cmTarget::EXECUTABLE) { @@ -591,9 +593,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, } else { - cmGeneratorTarget* gt = - this->GlobalGenerator->GetGeneratorTarget(target); - location = gt->GetLocation(buildType); + location = target->GetLocation(buildType); } fout<<"