summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-11 19:01:12 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-11 20:04:21 (GMT)
commit90ad087ab9075cc9648df0623502da0caa44e971 (patch)
tree12a4d2ac794e386bc4480b01d53dcb5d1953be22 /Source/cmakemain.cxx
parent7195ec92b2f34ef16ff1382fb00f527a3609f3bf (diff)
downloadCMake-90ad087ab9075cc9648df0623502da0caa44e971.zip
CMake-90ad087ab9075cc9648df0623502da0caa44e971.tar.gz
CMake-90ad087ab9075cc9648df0623502da0caa44e971.tar.bz2
cmake: Fix --build <relative-dir> for VS generators (#15609)
The VS >= 10 generators need to parse the .sln file from the build directory to locate targets in subdirectories. This occurs after we change the working directory to the build tree. If a relative directory other than "." was given then we would change to it and also refer to the .sln file location with it. Fix this by converting the build tree to a full path always. This will also give a more informative error message when the directory does not exist.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index cc30732..c94ffec 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -420,7 +420,7 @@ static int do_build(int ac, char const* const* av)
switch (doing)
{
case DoingDir:
- dir = av[i];
+ dir = cmSystemTools::CollapseFullPath(av[i]);
doing = DoingNone;
break;
case DoingTarget: