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

Method ComputeLongestObjectDirectory

Source/cmLocalVisualStudio7Generator.cxx:1626–1647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1624}
1625
1626std::string cmLocalVisualStudio7Generator::ComputeLongestObjectDirectory(
1627 cmGeneratorTarget const* target) const
1628{
1629 std::vector<std::string> configs =
1630 target->Target->GetMakefile()->GetGeneratorConfigs(
1631 cmMakefile::ExcludeEmptyConfig);
1632
1633 // Compute the maximum length configuration name.
1634 std::string config_max;
1635 for (auto& config : configs) {
1636 if (config.size() > config_max.size()) {
1637 config_max = config;
1638 }
1639 }
1640
1641 // Compute the maximum length full path to the intermediate
1642 // files directory for any configuration. This is used to construct
1643 // object file names that do not produce paths that are too long.
1644 std::string dir_max =
1645 cmStrCat(target->GetSupportDirectory(), '/', config_max, '/');
1646 return dir_max;
1647}
1648
1649bool cmLocalVisualStudio7Generator::WriteGroup(
1650 cmSourceGroup const* sg, cmGeneratorTarget* target, std::ostream& fout,

Callers 1

Calls 5

GetGeneratorConfigsMethod · 0.80
GetSupportDirectoryMethod · 0.80
cmStrCatFunction · 0.70
GetMakefileMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected