From 945f2c2214bc80f513ed08ebe2c8003263a4ee56 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 23 Mar 2011 15:06:44 -0400 Subject: With very long file names, VS 2010 was unable to compile files. At some point in the past VS 2010 failed some tests with custom commands when relative paths were not used. It seems that those problems have been fixed. However, the relative paths apparently are appended to the current working directoy before vs accesses the file. So, with a long path, relative paths cause it to create a combined path that is too long. --- Source/cmVisualStudio10TargetGenerator.cxx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 8a27ffd..f872838 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -367,10 +367,7 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source, static_cast (this->GlobalGenerator)->GetConfigurations(); this->WriteString("Makefile->GetCurrentOutputDirectory(), - sourcePath.c_str()); + std::string path = sourcePath; this->ConvertToWindowsSlash(path); (*this->BuildFileStream ) << path << "\">\n"; for(std::vector::iterator i = configs->begin(); @@ -609,9 +606,6 @@ WriteGroupSources(const char* name, const char* filter = sourceGroup.GetFullName(); this->WriteString("<", 2); std::string path = source; - path = cmSystemTools::RelativePath( - this->Makefile->GetCurrentOutputDirectory(), - source.c_str()); this->ConvertToWindowsSlash(path); (*this->BuildFileStream) << name << " Include=\"" << path; @@ -685,9 +679,6 @@ void cmVisualStudio10TargetGenerator::WriteCLSources() bool rc = lang && (strcmp(lang, "RC") == 0); bool idl = ext == "idl"; std::string sourceFile = (*source)->GetFullPath(); - sourceFile = cmSystemTools::RelativePath( - this->Makefile->GetCurrentOutputDirectory(), - sourceFile.c_str()); this->ConvertToWindowsSlash(sourceFile); // output the source file if(header) -- cgit v0.12