diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-07-10 13:12:39 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-07-10 13:12:39 (GMT) |
commit | 5c4208f50e30a601b0cddd238232ca3f0db833af (patch) | |
tree | 507f16e1f2c2dadd822ea586bd289a6708ad82bc /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 3199db4794722f3cfde50b364545517fcb4d370c (diff) | |
download | CMake-5c4208f50e30a601b0cddd238232ca3f0db833af.zip CMake-5c4208f50e30a601b0cddd238232ca3f0db833af.tar.gz CMake-5c4208f50e30a601b0cddd238232ca3f0db833af.tar.bz2 |
ENH: only 5 failing tests for VS 10
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 7fb04b1..e0baa18 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1405,6 +1405,38 @@ cmLocalVisualStudio7GeneratorFCInfo } } + +void cmLocalVisualStudio7Generator +::ComputeMaxDirectoryLength(std::string& maxdir, + cmTarget& target) +{ + std::vector<std::string> *configs = + static_cast<cmGlobalVisualStudio7Generator *> + (this->GlobalGenerator)->GetConfigurations(); + // Compute the maximum length configuration name. + std::string config_max; + for(std::vector<std::string>::iterator i = configs->begin(); + i != configs->end(); ++i) + { + if(i->size() > config_max.size()) + { + config_max = *i; + } + } + + // Compute the maximum length full path to the intermediate + // files directory for any configuration. This is used to construct + // object file names that do not produce paths that are too long. + std::string dir_max; + dir_max += this->Makefile->GetCurrentOutputDirectory(); + dir_max += "/"; + dir_max += this->GetTargetDirectory(target); + dir_max += "/"; + dir_max += config_max; + dir_max += "/"; + maxdir = dir_max; +} + void cmLocalVisualStudio7Generator ::WriteGroup(const cmSourceGroup *sg, cmTarget& target, std::ostream &fout, const char *libName, @@ -1425,27 +1457,11 @@ void cmLocalVisualStudio7Generator this->WriteVCProjBeginGroup(fout, name.c_str(), ""); } - // Compute the maximum length configuration name. - std::string config_max; - for(std::vector<std::string>::iterator i = configs->begin(); - i != configs->end(); ++i) - { - if(i->size() > config_max.size()) - { - config_max = *i; - } - } - // Compute the maximum length full path to the intermediate // files directory for any configuration. This is used to construct // object file names that do not produce paths that are too long. std::string dir_max; - dir_max += this->Makefile->GetCurrentOutputDirectory(); - dir_max += "/"; - dir_max += this->GetTargetDirectory(target); - dir_max += "/"; - dir_max += config_max; - dir_max += "/"; + this->ComputeMaxDirectoryLength(dir_max, target); // Loop through each source in the source group. std::string objectName; |