summaryrefslogtreecommitdiff
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-10 13:53:57 -0400
committerBrad King <brad.king@kitware.com>2014-03-12 10:44:00 -0400
commitd45e7f34611cd678bdda29d7d2b2ff4ce1abbce7 (patch)
tree8ebbe10ac12a7d52520ee22b01c6a4391e2dd319 /Source/cmLocalNinjaGenerator.cxx
parentcb8f87f6229359790956a6640639bbe6b8c346f7 (diff)
downloadcmake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.tar.gz
cmCustomCommand: Return std::string from GetWorkingDirectory
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index acaacdda34..d68a07bc05 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -364,8 +364,8 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(const cmCustomCommand *cc,
{
cmCustomCommandGenerator ccg(*cc, this->GetConfigName(), this->Makefile);
if (ccg.GetNumberOfCommands() > 0) {
- const char* wd = cc->GetWorkingDirectory();
- if (!wd)
+ std::string wd = cc->GetWorkingDirectory();
+ if (wd.empty())
wd = this->GetMakefile()->GetStartOutputDirectory();
cmOStringStream cdCmd;
@@ -491,7 +491,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher(
if(!outputs.empty())
{
RelativeRoot relative_root =
- cc.GetWorkingDirectory() ? NONE : START_OUTPUT;
+ cc.GetWorkingDirectory().empty() ? START_OUTPUT : NONE;
output = this->Convert(outputs[0], relative_root, SHELL);
}