summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx29
1 files changed, 2 insertions, 27 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index e4802d5..012013c 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -429,35 +429,10 @@ cmExtraSublimeTextGenerator::ComputeFlagsForObject(cmSourceFile* source,
lg->AppendFlags(flags, makefile->GetDefineFlags());
// Add target-specific flags.
- if(target->GetProperty("COMPILE_FLAGS"))
- {
- std::string langIncludeExpr = "CMAKE_";
- langIncludeExpr += language;
- langIncludeExpr += "_FLAG_REGEX";
- const char* regex = makefile->GetDefinition(langIncludeExpr.c_str());
- if(regex)
- {
- cmsys::RegularExpression r(regex);
- std::vector<std::string> args;
- cmSystemTools::
- ParseWindowsCommandLine(target->GetProperty("COMPILE_FLAGS"), args);
- for(std::vector<std::string>::iterator i = args.begin();
- i != args.end(); ++i)
- {
- if(r.find(i->c_str()))
- {
- lg->AppendFlags(flags, i->c_str());
- }
- }
- }
- else
- {
- lg->AppendFlags(flags, target->GetProperty("COMPILE_FLAGS"));
- }
- }
+ lg->AddCompileOptions(flags, target, config, language);
// Add source file specific flags.
- lg->AppendFlags(flags, target->GetProperty("COMPILE_FLAGS"));
+ lg->AppendFlags(flags, source->GetProperty("COMPILE_FLAGS"));
// TODO: Handle Apple frameworks.