summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-10 16:09:13 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-17 18:53:01 (GMT)
commit802b36fb62c7dc9a471bdb630536c82491e9cd0e (patch)
treef5296e293c0845a105a4266005e9c2239cb22312 /Source/cmExtraSublimeTextGenerator.cxx
parent3c488ce89955d00785bb4637c87b960da6c55ec8 (diff)
downloadCMake-802b36fb62c7dc9a471bdb630536c82491e9cd0e.zip
CMake-802b36fb62c7dc9a471bdb630536c82491e9cd0e.tar.gz
CMake-802b36fb62c7dc9a471bdb630536c82491e9cd0e.tar.bz2
cmExtraSublimeTextGenerator: Use GetTargetCompileFlags
Replace some custom code with equivalent code from the framework. This also fixes some fixmes left in the custom code.
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx27
1 files changed, 3 insertions, 24 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 9b3ea0b..2b9f64f 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -314,27 +314,14 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
cmSourceFile* source, cmLocalGenerator* lg, cmGeneratorTarget* gtgt)
{
std::string flags;
-
- cmMakefile* makefile = lg->GetMakefile();
std::string language = source->GetLanguage();
if (language.empty()) {
language = "C";
}
- const std::string& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
- // Add language-specific flags.
- lg->AddLanguageFlags(flags, language, config);
-
- lg->AddArchitectureFlags(flags, gtgt, language, config);
+ std::string const& config =
+ lg->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE");
- // TODO: Fortran support.
- // // Fortran-specific flags computed for this target.
- // if(*l == "Fortran")
- // {
- // this->AddFortranFlags(flags);
- // }
-
- // Add shared-library flags if needed.
- lg->AddCMP0018Flags(flags, gtgt, language, config);
+ lg->GetTargetCompileFlags(gtgt, config, language, flags);
// Add include directory flags.
{
@@ -345,17 +332,9 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
lg->AppendFlags(flags, includeFlags);
}
- // Append old-style preprocessor definition flags.
- lg->AppendFlags(flags, makefile->GetDefineFlags());
-
- // Add target-specific flags.
- lg->AddCompileOptions(flags, gtgt, language, config);
-
// Add source file specific flags.
lg->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS"));
- // TODO: Handle Apple frameworks.
-
return flags;
}