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

Method AddSystemIncludeDirectory

Source/cmGeneratorTarget.cxx:602–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602void cmGeneratorTarget::AddSystemIncludeDirectory(std::string const& inc,
603 std::string const& lang)
604{
605 std::string config_upper;
606 auto const& configs =
607 this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
608
609 for (auto const& config : configs) {
610 std::string inc_with_config = inc;
611 if (!config.empty()) {
612 cmSystemTools::ReplaceString(inc_with_config, "$<CONFIG>", config);
613 config_upper = cmSystemTools::UpperCase(config);
614 }
615 auto const& key = cmStrCat(config_upper, '/', lang);
616 this->Target->AddSystemIncludeDirectories({ inc_with_config });
617 if (this->SystemIncludesCache.find(key) ==
618 this->SystemIncludesCache.end()) {
619 this->AddSystemIncludeCacheKey(key, config, lang);
620 }
621 this->SystemIncludesCache[key].emplace_back(inc_with_config);
622
623 // SystemIncludesCache should be sorted so that binary search can be used
624 std::sort(this->SystemIncludesCache[key].begin(),
625 this->SystemIncludesCache[key].end());
626 }
627}
628
629std::vector<cmSourceFile*> const* cmGeneratorTarget::GetSourceDepends(
630 cmSourceFile const* sf) const

Callers 1

InitCustomTargetsMethod · 0.80

Calls 9

GetGeneratorConfigsMethod · 0.80
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected