MCPcopy Create free account
hub / github.com/Kitware/CMake / ComputeIncludes

Method ComputeIncludes

Source/cmExtraSublimeTextGenerator.cxx:414–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414std::string cmExtraSublimeTextGenerator::ComputeIncludes(
415 cmSourceFile* source, cmLocalGenerator* lg, cmGeneratorTarget* target)
416
417{
418 std::vector<std::string> includes;
419 cmMakefile* makefile = lg->GetMakefile();
420 std::string const& language = source->GetOrDetermineLanguage();
421 std::string const& config = makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
422 cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
423 language);
424
425 // Add include directories for this source file
426 std::string const INCLUDE_DIRECTORIES("INCLUDE_DIRECTORIES");
427 if (cmValue cincludes = source->GetProperty(INCLUDE_DIRECTORIES)) {
428 lg->AppendIncludeDirectories(
429 includes, genexInterpreter.Evaluate(*cincludes, INCLUDE_DIRECTORIES),
430 *source);
431 }
432
433 // Add include directory flags.
434 lg->GetIncludeDirectories(includes, target, language, config);
435
436 std::string includesString =
437 lg->GetIncludeFlags(includes, target, language, config, false);
438
439 return includesString;
440}
441
442bool cmExtraSublimeTextGenerator::Open(std::string const& bindir,
443 std::string const& projectName,

Callers 1

AppendTargetMethod · 0.95

Calls 6

GetIncludeFlagsMethod · 0.80
GetMakefileMethod · 0.45
GetPropertyMethod · 0.45
EvaluateMethod · 0.45
GetIncludeDirectoriesMethod · 0.45

Tested by

no test coverage detected