C::B: Port API to cmGeneratorTarget.
This commit is contained in:
parent
b74aa0e3d2
commit
bcee21ceb7
|
@ -17,7 +17,6 @@
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
#include "cmSourceFile.h"
|
#include "cmSourceFile.h"
|
||||||
#include "cmGeneratedFileStream.h"
|
#include "cmGeneratedFileStream.h"
|
||||||
#include "cmTarget.h"
|
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmXMLSafe.h"
|
#include "cmXMLSafe.h"
|
||||||
|
|
||||||
|
@ -441,7 +440,7 @@ void cmExtraCodeBlocksGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
CbpUnit &cbpUnit = allFiles[fullPath];
|
CbpUnit &cbpUnit = allFiles[fullPath];
|
||||||
cbpUnit.Targets.push_back((*ti)->Target);
|
cbpUnit.Targets.push_back(*ti);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: // intended fallthrough
|
default: // intended fallthrough
|
||||||
|
@ -501,8 +500,9 @@ void cmExtraCodeBlocksGenerator
|
||||||
|
|
||||||
fout<<" <Unit filename=\""<< cmXMLSafe(unitFilename) <<"\">\n";
|
fout<<" <Unit filename=\""<< cmXMLSafe(unitFilename) <<"\">\n";
|
||||||
|
|
||||||
for(std::vector<const cmTarget*>::const_iterator ti = unit.Targets.begin();
|
for(std::vector<const cmGeneratorTarget*>::const_iterator ti =
|
||||||
ti != unit.Targets.end(); ++ti)
|
unit.Targets.begin();
|
||||||
|
ti != unit.Targets.end(); ++ti)
|
||||||
{
|
{
|
||||||
std::string const& targetName = (*ti)->GetName();
|
std::string const& targetName = (*ti)->GetName();
|
||||||
fout<<" <Option target=\""<< cmXMLSafe(targetName) <<"\"/>\n";
|
fout<<" <Option target=\""<< cmXMLSafe(targetName) <<"\"/>\n";
|
||||||
|
@ -560,7 +560,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
fout<<" <Target title=\"" << targetName << "\">\n";
|
fout<<" <Target title=\"" << targetName << "\">\n";
|
||||||
if (target!=0)
|
if (target!=0)
|
||||||
{
|
{
|
||||||
int cbTargetType = this->GetCBTargetType(target->Target);
|
int cbTargetType = this->GetCBTargetType(target);
|
||||||
std::string workingDir = lg->GetCurrentBinaryDirectory();
|
std::string workingDir = lg->GetCurrentBinaryDirectory();
|
||||||
if ( target->GetType()==cmState::EXECUTABLE)
|
if ( target->GetType()==cmState::EXECUTABLE)
|
||||||
{
|
{
|
||||||
|
@ -718,7 +718,7 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||||
|
|
||||||
|
|
||||||
// Translate the cmake target type into the CodeBlocks target type id
|
// Translate the cmake target type into the CodeBlocks target type id
|
||||||
int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target)
|
int cmExtraCodeBlocksGenerator::GetCBTargetType(cmGeneratorTarget* target)
|
||||||
{
|
{
|
||||||
if ( target->GetType()==cmState::EXECUTABLE)
|
if ( target->GetType()==cmState::EXECUTABLE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
class cmLocalGenerator;
|
class cmLocalGenerator;
|
||||||
class cmMakefile;
|
class cmMakefile;
|
||||||
class cmGeneratorTarget;
|
class cmGeneratorTarget;
|
||||||
class cmTarget;
|
|
||||||
class cmGeneratedFileStream;
|
class cmGeneratedFileStream;
|
||||||
|
|
||||||
/** \class cmExtraCodeBlocksGenerator
|
/** \class cmExtraCodeBlocksGenerator
|
||||||
|
@ -42,7 +41,7 @@ public:
|
||||||
private:
|
private:
|
||||||
struct CbpUnit
|
struct CbpUnit
|
||||||
{
|
{
|
||||||
std::vector<const cmTarget*> Targets;
|
std::vector<const cmGeneratorTarget*> Targets;
|
||||||
};
|
};
|
||||||
|
|
||||||
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
|
void CreateProjectFile(const std::vector<cmLocalGenerator*>& lgs);
|
||||||
|
@ -53,7 +52,7 @@ private:
|
||||||
cmGeneratorTarget* target) const;
|
cmGeneratorTarget* target) const;
|
||||||
|
|
||||||
std::string GetCBCompilerId(const cmMakefile* mf);
|
std::string GetCBCompilerId(const cmMakefile* mf);
|
||||||
int GetCBTargetType(cmTarget* target);
|
int GetCBTargetType(cmGeneratorTarget* target);
|
||||||
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
std::string BuildMakeCommand(const std::string& make, const char* makefile,
|
||||||
const std::string& target);
|
const std::string& target);
|
||||||
void AppendTarget(cmGeneratedFileStream& fout,
|
void AppendTarget(cmGeneratedFileStream& fout,
|
||||||
|
|
Loading…
Reference in New Issue