From e47fbcb9a83b732da5107e1ea2f30b144cd04387 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 29 Aug 2007 16:32:20 -0400 Subject: [PATCH] BUG: work if there are spaces in the path to cmake Alex --- Source/CPack/cmCPackDebGenerator.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index c8b6d4e35..fb6f8146c 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -138,8 +138,9 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName, topLevelWithTrailingSlash += '/'; for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) { - cmd = cmakeExecutable; - cmd += " -E md5sum \""; + cmd = "\""; + cmd += cmakeExecutable; + cmd += "\" -E md5sum \""; cmd += *fileIt; cmd += "\""; //std::string output; @@ -158,8 +159,9 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName, } - cmd = cmakeExecutable; - cmd += " -E tar cfz control.tar.gz ./control ./md5sums"; + cmd = "\""; + cmd += cmakeExecutable; + cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums"; res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, &retVal, toplevel, this->GeneratorVerbose, 0);