summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-10 17:53:57 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-12 14:44:00 (GMT)
commitd45e7f34611cd678bdda29d7d2b2ff4ce1abbce7 (patch)
tree8ebbe10ac12a7d52520ee22b01c6a4391e2dd319 /Source/cmLocalNinjaGenerator.cxx
parentcb8f87f6229359790956a6640639bbe6b8c346f7 (diff)
downloadCMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.zip
CMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.tar.gz
CMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.tar.bz2
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 acaacdd..d68a07b 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);
}