summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-18 21:53:26 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:54 (GMT)
commitb92d0b2c94936fa438c8c92a6961b6323795d6f9 (patch)
tree8581e73acc376ac3cbf967cb31018b379c7d5ec4 /Source/cmExtraSublimeTextGenerator.cxx
parent05982b26e6fc58422dd4c05497466f206d6c93f7 (diff)
downloadCMake-b92d0b2c94936fa438c8c92a6961b6323795d6f9.zip
CMake-b92d0b2c94936fa438c8c92a6961b6323795d6f9.tar.gz
CMake-b92d0b2c94936fa438c8c92a6961b6323795d6f9.tar.bz2
Sublime: Port API to cmGeneratorTarget.
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 47822e8..92d38b9 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -20,7 +20,6 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmSystemTools.h"
-#include "cmTarget.h"
#include <cmsys/SystemTools.hxx>
@@ -204,12 +203,12 @@ void cmExtraSublimeTextGenerator::
case cmState::MODULE_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(),
sourceFileFlags, false);
std::string fastTarget = targetName;
fastTarget += "/fast";
- this->AppendTarget(fout, fastTarget, *lg, (*ti)->Target,
+ this->AppendTarget(fout, fastTarget, *lg, *ti,
make.c_str(), makefile, compiler.c_str(),
sourceFileFlags, false);
}
@@ -225,7 +224,7 @@ void cmExtraSublimeTextGenerator::
AppendTarget(cmGeneratedFileStream& fout,
const std::string& targetName,
cmLocalGenerator* lg,
- cmTarget* target,
+ cmGeneratorTarget* target,
const char* make,
const cmMakefile* makefile,
const char*, //compiler
@@ -235,10 +234,8 @@ void cmExtraSublimeTextGenerator::
if (target != 0)
{
- cmGeneratorTarget *gtgt = this->GlobalGenerator
- ->GetGeneratorTarget(target);
std::vector<cmSourceFile*> sourceFiles;
- gtgt->GetSourceFiles(sourceFiles,
+ target->GetSourceFiles(sourceFiles,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
std::vector<cmSourceFile*>::const_iterator sourceFilesEnd =
sourceFiles.end();
@@ -256,9 +253,9 @@ void cmExtraSublimeTextGenerator::
}
std::vector<std::string>& flags = sourceFileFlagsIter->second;
std::string flagsString =
- this->ComputeFlagsForObject(*iter, lg, gtgt);
+ this->ComputeFlagsForObject(*iter, lg, target);
std::string definesString =
- this->ComputeDefines(*iter, lg, gtgt);
+ this->ComputeDefines(*iter, lg, target);
flags.clear();
cmsys::RegularExpression flagRegex;
// Regular expression to extract compiler flags from a string