summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2011-06-21 20:00:31 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2011-06-21 20:00:31 (GMT)
commit38368d52f34086294f4647b97a7111fa2547905a (patch)
tree61ba3f766c2c5feccc440d8fcedec9c03c0d587c /Source
parent8cd66dc0d275208367dd6b5ef266395ef92ed424 (diff)
downloadCMake-38368d52f34086294f4647b97a7111fa2547905a.zip
CMake-38368d52f34086294f4647b97a7111fa2547905a.tar.gz
CMake-38368d52f34086294f4647b97a7111fa2547905a.tar.bz2
Revert "With very long file names, VS 2010 was unable to compile files."
This reverts commit 945f2c2214bc80f513ed08ebe2c8003263a4ee56.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6d2338e..d15099a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -367,7 +367,10 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
this->WriteString("<CustomBuild Include=\"", 2);
- std::string path = sourcePath;
+ std::string path =
+ cmSystemTools::RelativePath(
+ this->Makefile->GetCurrentOutputDirectory(),
+ sourcePath.c_str());
this->ConvertToWindowsSlash(path);
(*this->BuildFileStream ) << path << "\">\n";
for(std::vector<std::string>::iterator i = configs->begin();
@@ -608,6 +611,9 @@ 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;
@@ -695,6 +701,9 @@ 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)