Sublime: Port API to cmGeneratorTarget.
This commit is contained in:
parent
05982b26e6
commit
b92d0b2c94
@ -20,7 +20,6 @@
|
|||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmSourceFile.h"
|
#include "cmSourceFile.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmTarget.h"
|
|
||||||
|
|
||||||
#include <cmsys/SystemTools.hxx>
|
#include <cmsys/SystemTools.hxx>
|
||||||
|
|
||||||
@ -204,12 +203,12 @@ void cmExtraSublimeTextGenerator::
|
|||||||
case cmState::MODULE_LIBRARY:
|
case cmState::MODULE_LIBRARY:
|
||||||
case cmState::OBJECT_LIBRARY:
|
case cmState::OBJECT_LIBRARY:
|
||||||
{
|
{
|
||||||
this->AppendTarget(fout, targetName, *lg, (*ti)->Target,
|
this->AppendTarget(fout, targetName, *lg, *ti,
|
||||||
make.c_str(), makefile, compiler.c_str(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
std::string fastTarget = targetName;
|
std::string fastTarget = targetName;
|
||||||
fastTarget += "/fast";
|
fastTarget += "/fast";
|
||||||
this->AppendTarget(fout, fastTarget, *lg, (*ti)->Target,
|
this->AppendTarget(fout, fastTarget, *lg, *ti,
|
||||||
make.c_str(), makefile, compiler.c_str(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
}
|
}
|
||||||
@ -225,7 +224,7 @@ void cmExtraSublimeTextGenerator::
|
|||||||
AppendTarget(cmGeneratedFileStream& fout,
|
AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const std::string& targetName,
|
const std::string& targetName,
|
||||||
cmLocalGenerator* lg,
|
cmLocalGenerator* lg,
|
||||||
cmTarget* target,
|
cmGeneratorTarget* target,
|
||||||
const char* make,
|
const char* make,
|
||||||
const cmMakefile* makefile,
|
const cmMakefile* makefile,
|
||||||
const char*, //compiler
|
const char*, //compiler
|
||||||
@ -235,10 +234,8 @@ void cmExtraSublimeTextGenerator::
|
|||||||
|
|
||||||
if (target != 0)
|
if (target != 0)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget *gtgt = this->GlobalGenerator
|
|
||||||
->GetGeneratorTarget(target);
|
|
||||||
std::vector<cmSourceFile*> sourceFiles;
|
std::vector<cmSourceFile*> sourceFiles;
|
||||||
gtgt->GetSourceFiles(sourceFiles,
|
target->GetSourceFiles(sourceFiles,
|
||||||
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
|
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
|
||||||
std::vector<cmSourceFile*>::const_iterator sourceFilesEnd =
|
std::vector<cmSourceFile*>::const_iterator sourceFilesEnd =
|
||||||
sourceFiles.end();
|
sourceFiles.end();
|
||||||
@ -256,9 +253,9 @@ void cmExtraSublimeTextGenerator::
|
|||||||
}
|
}
|
||||||
std::vector<std::string>& flags = sourceFileFlagsIter->second;
|
std::vector<std::string>& flags = sourceFileFlagsIter->second;
|
||||||
std::string flagsString =
|
std::string flagsString =
|
||||||
this->ComputeFlagsForObject(*iter, lg, gtgt);
|
this->ComputeFlagsForObject(*iter, lg, target);
|
||||||
std::string definesString =
|
std::string definesString =
|
||||||
this->ComputeDefines(*iter, lg, gtgt);
|
this->ComputeDefines(*iter, lg, target);
|
||||||
flags.clear();
|
flags.clear();
|
||||||
cmsys::RegularExpression flagRegex;
|
cmsys::RegularExpression flagRegex;
|
||||||
// Regular expression to extract compiler flags from a string
|
// Regular expression to extract compiler flags from a string
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
class cmLocalGenerator;
|
class cmLocalGenerator;
|
||||||
class cmMakefile;
|
class cmMakefile;
|
||||||
class cmTarget;
|
|
||||||
class cmGeneratedFileStream;
|
class cmGeneratedFileStream;
|
||||||
class cmGeneratorTarget;
|
class cmGeneratorTarget;
|
||||||
|
|
||||||
@ -67,7 +66,7 @@ private:
|
|||||||
void AppendTarget(cmGeneratedFileStream& fout,
|
void AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const std::string& targetName,
|
const std::string& targetName,
|
||||||
cmLocalGenerator* lg,
|
cmLocalGenerator* lg,
|
||||||
cmTarget* target,
|
cmGeneratorTarget* target,
|
||||||
const char* make,
|
const char* make,
|
||||||
const cmMakefile* makefile,
|
const cmMakefile* makefile,
|
||||||
const char* compiler,
|
const char* compiler,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user