summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.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/cmLocalVisualStudioGenerator.cxx
parentcb8f87f6229359790956a6640639bbe6b8c346f7 (diff)
downloadCMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.zip
CMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.tar.gz
CMake-d45e7f34611cd678bdda29d7d2b2ff4ce1abbce7.tar.bz2
cmCustomCommand: Return std::string from GetWorkingDirectory
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 6e93d22..3075c15 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -84,9 +84,9 @@ cmLocalVisualStudioGenerator
const std::string& newline_text)
{
bool useLocal = this->CustomCommandUseLocal();
- const char* workingDirectory = cc.GetWorkingDirectory();
+ std::string workingDirectory = cc.GetWorkingDirectory();
cmCustomCommandGenerator ccg(cc, configName, this->Makefile);
- RelativeRoot relativeRoot = workingDirectory? NONE : START_OUTPUT;
+ RelativeRoot relativeRoot = workingDirectory.empty()? START_OUTPUT : NONE;
// Avoid leading or trailing newlines.
std::string newline = "";
@@ -114,7 +114,7 @@ cmLocalVisualStudioGenerator
script += "setlocal";
}
- if(workingDirectory)
+ if(!workingDirectory.empty())
{
// Change the working directory.
script += newline;
@@ -124,7 +124,7 @@ cmLocalVisualStudioGenerator
script += check_error;
// Change the working drive.
- if(workingDirectory[0] && workingDirectory[1] == ':')
+ if(workingDirectory.size() > 1 && workingDirectory[1] == ':')
{
script += newline;
newline = newline_text;