diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 161b532..e568704 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -331,7 +331,7 @@ void cmGlobalVisualStudio10Generator::Generate() this->cmGlobalVisualStudio8Generator::Generate(); if(this->LongestSource.Length > 0) { - cmMakefile* mf = this->LongestSource.Target->GetMakefile(); + cmLocalGenerator* lg = this->LongestSource.Target->GetLocalGenerator(); std::ostringstream e; e << "The binary and/or source directory paths may be too long to generate " @@ -346,13 +346,13 @@ void cmGlobalVisualStudio10Generator::Generate() " " << this->LongestSource.SourceFile->GetFullPath() << "\n" "This is because some Visual Studio tools would append the relative " "path to the end of the referencing directory path, as in:\n" - " " << mf->GetCurrentBinaryDirectory() << "/" + " " << lg->GetCurrentBinaryDirectory() << "/" << this->LongestSource.SourceRel << "\n" "and then incorrectly complain that the file does not exist because " "the path length is too long for some internal buffer or API. " "To avoid this problem CMake must use a full path for this file " "which then triggers the VS 10 property dialog bug."; - mf->IssueMessage(cmake::WARNING, e.str().c_str()); + lg->IssueMessage(cmake::WARNING, e.str().c_str()); } } @@ -591,9 +591,11 @@ cmGlobalVisualStudio10Generator //---------------------------------------------------------------------------- void cmGlobalVisualStudio10Generator::PathTooLong( - cmTarget* target, cmSourceFile const* sf, std::string const& sfRel) + cmGeneratorTarget *target, cmSourceFile const* sf, + std::string const& sfRel) { - size_t len = (strlen(target->GetMakefile()->GetCurrentBinaryDirectory()) + + size_t len = + (strlen(target->GetLocalGenerator()->GetCurrentBinaryDirectory()) + 1 + sfRel.length()); if(len > this->LongestSource.Length) { |