From a143d4ac60da28e12f8b81db39a11226bac8a516 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 9 Oct 2015 22:04:51 +0200 Subject: Sublime: Port some API to cmGeneratorTarget. --- Source/cmExtraSublimeTextGenerator.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Source/cmExtraSublimeTextGenerator.cxx') diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 6306360317..b8ec0f93d7 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -254,9 +254,9 @@ void cmExtraSublimeTextGenerator:: } std::vector& flags = sourceFileFlagsIter->second; std::string flagsString = - this->ComputeFlagsForObject(*iter, lg, target, gtgt); + this->ComputeFlagsForObject(*iter, lg, gtgt); std::string definesString = - this->ComputeDefines(*iter, lg, target, gtgt); + this->ComputeDefines(*iter, lg, gtgt); flags.clear(); cmsys::RegularExpression flagRegex; // Regular expression to extract compiler flags from a string @@ -364,7 +364,6 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand( std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source, cmLocalGenerator* lg, - cmTarget *target, cmGeneratorTarget* gtgt) { std::string flags; @@ -389,7 +388,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source, // } // Add shared-library flags if needed. - lg->AddCMP0018Flags(flags, target, language, config); + lg->AddCMP0018Flags(flags, gtgt->Target, language, config); // Add include directory flags. { @@ -404,7 +403,7 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source, lg->AppendFlags(flags, makefile->GetDefineFlags()); // Add target-specific flags. - lg->AddCompileOptions(flags, target, language, config); + lg->AddCompileOptions(flags, gtgt->Target, language, config); // Add source file specific flags. lg->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS")); @@ -418,8 +417,8 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source, // void cmMakefileTargetGenerator::WriteTargetLanguageFlags(). std::string cmExtraSublimeTextGenerator:: -ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target, - cmGeneratorTarget*) +ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, + cmGeneratorTarget* target) { std::set defines; @@ -428,13 +427,13 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target, const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); // Add the export symbol definition for shared library objects. - if(const char* exportMacro = target->GetExportMacro()) + if(const char* exportMacro = target->Target->GetExportMacro()) { lg->AppendDefines(defines, exportMacro); } // Add preprocessor definitions for this target and configuration. - lg->AddCompileDefinitions(defines, target, config, language); + lg->AddCompileDefinitions(defines, target->Target, config, language); lg->AppendDefines(defines, source->GetProperty("COMPILE_DEFINITIONS")); { std::string defPropName = "COMPILE_DEFINITIONS_"; -- cgit v1.2.1