summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-13 20:05:01 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-13 20:05:01 (GMT)
commit5e02b5ec961bc6dd5ce73df2d0cfd5c8c0524f90 (patch)
tree74239bcde025e3d04acdd9fc4c96e96f78191fbc
parent3a7920d46113c4bc64980febf16119553a28eec2 (diff)
downloadCMake-5e02b5ec961bc6dd5ce73df2d0cfd5c8c0524f90.zip
CMake-5e02b5ec961bc6dd5ce73df2d0cfd5c8c0524f90.tar.gz
CMake-5e02b5ec961bc6dd5ce73df2d0cfd5c8c0524f90.tar.bz2
BUG: Only do ~ test if HOME variable is defined.
-rw-r--r--Source/kwsys/testSystemTools.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 28de9a9..600ed5a 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -54,9 +54,11 @@ int main(/*int argc, char* argv*/)
{
CheckConvertToUnixSlashes(toUnixPaths[cc][0], toUnixPaths[cc][1]);
}
+
+ // Special check for ~
+ kwsys_stl::string output;
+ if(kwsys::SystemTools::GetEnv("HOME", output))
{
- // Special check for ~
- kwsys_stl::string output = kwsys::SystemTools::GetEnv("HOME");
output += "/foo bar/lala";
CheckConvertToUnixSlashes("~/foo bar/lala", output);
}