[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-2368-g53527fe
Brad King
brad.king at kitware.com
Tue Apr 15 14:30:11 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 53527fe9a5218ecd701e36732f385db70e6acd0b (commit)
via 0d048384694b7285ef739153757b57791d4ebb93 (commit)
from 428d92b47c6e78344d9d16d017b4f6cdfc5c1799 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53527fe9a5218ecd701e36732f385db70e6acd0b
commit 53527fe9a5218ecd701e36732f385db70e6acd0b
Merge: 428d92b 0d04838
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 15 14:30:11 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 15 14:30:11 2014 -0400
Merge topic 'vs-use-full-paths' into next
0d048384 VS: Use full path to sources to allow deeper trees with VS >= 10
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d048384694b7285ef739153757b57791d4ebb93
commit 0d048384694b7285ef739153757b57791d4ebb93
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Apr 15 11:47:54 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Apr 15 11:52:48 2014 -0400
VS: Use full path to sources to allow deeper trees with VS >= 10
As explained in cmVisualStudio10TargetGenerator::WriteSource comments,
VS tools append relative paths to the current directory, e.g.
c:\path\to\current\dir\..\..\..\relative\path\to\source.c
and fail if this is over 250 charaters or so. Previously we used a full
path only if no relative path could be constructed with a leading "../"
sequence that does not escape the source or build tree. This means that
long relative paths can be generated when the build tree is inside the
source tree, and can cause build failures due to the above path
concatenation problem.
Teach cmVisualStudio10TargetGenerator::ConvertPath to ask the Convert
method to honor CMAKE_USE_RELATIVE_PATHS. This will cause it to use
full paths by default but still give users the option of getting the
relative paths when possible.
Suggested-by: Josh Green <inbilla at gmail.com>
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a999b2d..72bb020 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -685,7 +685,8 @@ cmVisualStudio10TargetGenerator::ConvertPath(std::string const& path,
this->Makefile->GetCurrentOutputDirectory(), path.c_str())
: this->LocalGenerator->Convert(path.c_str(),
cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED);
+ cmLocalGenerator::UNCHANGED,
+ /* optional = */ true);
}
void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s)
@@ -941,7 +942,7 @@ void cmVisualStudio10TargetGenerator::WriteSource(
// c:\path\to\current\dir\..\..\..\relative\path\to\source.c
//
// and fail if this exceeds the maximum allowed path length. Our path
- // conversion uses full paths outside the build tree to allow deeper trees.
+ // conversion uses full paths when possible to allow deeper trees.
bool forceRelative = false;
std::string sourceFile = this->ConvertPath(sf->GetFullPath(), false);
if(this->LocalGenerator->GetVersion() == cmLocalVisualStudioGenerator::VS10
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list