summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2017-12-15 11:31:53 (GMT)
committerMarc Chevrier <marc.chevrier@sap.com>2018-01-23 09:24:56 (GMT)
commit78b1c2e09ee5005d75e31c68c1c7b112e4b36d90 (patch)
tree3df5dc8f66711170a2cd8e0da75adeb7b79102b9 /Source/cmExtraSublimeTextGenerator.cxx
parent3f935e690a337a7a692c30d4d14082e08d1bed7c (diff)
downloadCMake-78b1c2e09ee5005d75e31c68c1c7b112e4b36d90.zip
CMake-78b1c2e09ee5005d75e31c68c1c7b112e4b36d90.tar.gz
CMake-78b1c2e09ee5005d75e31c68c1c7b112e4b36d90.tar.bz2
sourceFile properties: add property COMPILE_OPTIONS
Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index c7197f2..7e998c7 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -361,13 +361,20 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
}
// Add source file specific flags.
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, gtgt, config,
+ gtgt->GetName(), language);
+
const std::string COMPILE_FLAGS("COMPILE_FLAGS");
if (const char* cflags = source->GetProperty(COMPILE_FLAGS)) {
- cmGeneratorExpressionInterpreter genexInterpreter(
- lg, gtgt, config, gtgt->GetName(), language);
lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, COMPILE_FLAGS));
}
+ const std::string COMPILE_OPTIONS("COMPILE_OPTIONS");
+ if (const char* coptions = source->GetProperty(COMPILE_OPTIONS)) {
+ lg->AppendCompileOptions(
+ flags, genexInterpreter.Evaluate(coptions, COMPILE_OPTIONS));
+ }
+
return flags;
}