diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-09 20:04:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-12 16:39:59 (GMT) |
commit | a143d4ac60da28e12f8b81db39a11226bac8a516 (patch) | |
tree | 036c45352d68c41e12be95203ecec2f2ca961fca /Source/cmExtraSublimeTextGenerator.cxx | |
parent | 993aace78a12fba1a70f193a1e6ac0cbc6925bd6 (diff) | |
download | CMake-a143d4ac60da28e12f8b81db39a11226bac8a516.zip CMake-a143d4ac60da28e12f8b81db39a11226bac8a516.tar.gz CMake-a143d4ac60da28e12f8b81db39a11226bac8a516.tar.bz2 |
Sublime: Port some API to cmGeneratorTarget.
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r-- | Source/cmExtraSublimeTextGenerator.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 6306360..b8ec0f9 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -254,9 +254,9 @@ void cmExtraSublimeTextGenerator:: } std::vector<std::string>& 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<std::string> 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_"; |