diff options
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 30a2a1e..16c74b9 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1646,10 +1646,11 @@ void cmGlobalXCodeGenerator cmSystemTools::ReplaceString(cmd2, "/./", "/"); cmd2 = this->ConvertToRelativeForMake(cmd2.c_str()); std::string cmd; - if(cc.GetWorkingDirectory()) + std::string wd = cc.GetWorkingDirectory(); + if(!wd.empty()) { cmd += "cd "; - cmd += this->ConvertToRelativeForMake(cc.GetWorkingDirectory()); + cmd += this->ConvertToRelativeForMake(wd.c_str()); cmd += " && "; } cmd += cmd2; |