diff options
author | Brad King <brad.king@kitware.com> | 2014-04-15 15:47:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-15 15:52:48 (GMT) |
commit | 0d048384694b7285ef739153757b57791d4ebb93 (patch) | |
tree | d6e33aa67f358553c5dbc0442873a12470d06ee3 /Source/cmAddCompileOptionsCommand.cxx | |
parent | 8472ef243ffc9988ea8fb83cbc7acdf3f0daa239 (diff) | |
download | CMake-0d048384694b7285ef739153757b57791d4ebb93.zip CMake-0d048384694b7285ef739153757b57791d4ebb93.tar.gz CMake-0d048384694b7285ef739153757b57791d4ebb93.tar.bz2 |
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@gmail.com>
Diffstat (limited to 'Source/cmAddCompileOptionsCommand.cxx')
0 files changed, 0 insertions, 0 deletions