summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-08-27 11:44:54 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-08-27 13:21:24 (GMT)
commit998d9ee967f6795c71ff23cf16601f7e974b21ba (patch)
treef78024475a68eeb4294eb7be49cbc2efdf39cad2 /Source/cmLocalVisualStudioGenerator.cxx
parentee49f006cf657fa6f1c2d112f44d762441fd5cf1 (diff)
downloadCMake-998d9ee967f6795c71ff23cf16601f7e974b21ba.zip
CMake-998d9ee967f6795c71ff23cf16601f7e974b21ba.tar.gz
CMake-998d9ee967f6795c71ff23cf16601f7e974b21ba.tar.bz2
VS: Replace variable with an if()
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index bdb1c2b..ca006b7 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -127,7 +127,6 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
{
bool useLocal = this->CustomCommandUseLocal();
std::string workingDirectory = ccg.GetWorkingDirectory();
- RelativeRoot relativeRoot = workingDirectory.empty() ? START_OUTPUT : NONE;
// Avoid leading or trailing newlines.
std::string newline = "";
@@ -203,7 +202,11 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
}
}
- script += this->Convert(cmd.c_str(), relativeRoot, SHELL);
+ if (workingDirectory.empty()) {
+ script += this->Convert(cmd.c_str(), START_OUTPUT, SHELL);
+ } else {
+ script += this->Convert(cmd.c_str(), NONE, SHELL);
+ }
ccg.AppendArguments(c, script);
// After each custom command, check for an error result.