diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-11-03 20:57:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-11-03 20:57:56 (GMT) |
commit | eff0a824c4b1330da985dff3b7b9fa3793937866 (patch) | |
tree | 6018de2b5e433da38bb9ddba59c62aa6ba301cf5 /Source/cmMakefile.cxx | |
parent | 271f4be42a12628afd87502022e5df089bbdd215 (diff) | |
download | CMake-eff0a824c4b1330da985dff3b7b9fa3793937866.zip CMake-eff0a824c4b1330da985dff3b7b9fa3793937866.tar.gz CMake-eff0a824c4b1330da985dff3b7b9fa3793937866.tar.bz2 |
BUG: hack fix for problem of MS vs 6 and custom target commands
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d7ec582..c1bb833 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -570,12 +570,31 @@ AddCustomCommandToOutput(const char* outputIn, command = cmSystemTools::EscapeSpaces(command.c_str()); unsigned int i; + bool escapeSpaces = true; for (i = 0; i < commandArgs.size(); ++i) { expandC = commandArgs[i].c_str(); - this->ExpandVariablesInString(expandC); - combinedArgs += cmSystemTools::EscapeSpaces(expandC.c_str()); - combinedArgs += " "; + // This is a hack to fix a problem with cmCustomCommand + // The cmCustomCommand should store the arguments as a vector + // and not a string, and the cmAddCustomTargetCommand should + // not EscapeSpaces. + if(expandC == "This is really a single argument do not escape spaces") + { + escapeSpaces = false; + } + else + { + this->ExpandVariablesInString(expandC); + if(escapeSpaces) + { + combinedArgs += cmSystemTools::EscapeSpaces(expandC.c_str()); + } + else + { + combinedArgs += expandC; + } + combinedArgs += " "; + } } cmSourceFile *file = 0; |