diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 6982dda55..0e5c81e2f 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1205,8 +1205,15 @@ std::string cmSystemTools::CollapseFullPath(const char* in_name) char resolved_name[5024]; # endif # endif - realpath(dir.c_str(), resolved_name); - dir = resolved_name; + if(dir != "") + { + realpath(dir.c_str(), resolved_name); + dir = resolved_name; + } + else + { + dir = cmSystemTools::GetCurrentWorkingDirectory(); + } return dir + "/" + file; #endif }