From 78b1c2e09ee5005d75e31c68c1c7b112e4b36d90 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Fri, 15 Dec 2017 12:31:53 +0100 Subject: sourceFile properties: add property COMPILE_OPTIONS Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507 --- Source/cmExtraSublimeTextGenerator.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Source/cmExtraSublimeTextGenerator.cxx') diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index c7197f2eb4..7e998c71f4 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; } -- cgit v1.2.1