diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-03-13 19:23:58 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-03-13 19:23:58 (GMT) |
commit | 6349735590508504435612e36b48d782e9d068e6 (patch) | |
tree | ca105826fb45c30f9cdeb0438b021f0c4f4141af /Source/cmDSWWriter.cxx | |
parent | 809b32fe59ee9923eebbcfc373d9eaab158083e9 (diff) | |
download | CMake-6349735590508504435612e36b48d782e9d068e6.zip CMake-6349735590508504435612e36b48d782e9d068e6.tar.gz CMake-6349735590508504435612e36b48d782e9d068e6.tar.bz2 |
ENH: closer to working with spaces in the path
Diffstat (limited to 'Source/cmDSWWriter.cxx')
-rw-r--r-- | Source/cmDSWWriter.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmDSWWriter.cxx b/Source/cmDSWWriter.cxx index 36abbc5..9c719ff 100644 --- a/Source/cmDSWWriter.cxx +++ b/Source/cmDSWWriter.cxx @@ -64,6 +64,16 @@ void cmDSWWriter::OutputDSWFile() } +inline std::string removeQuotes(const std::string& s) +{ + if(s[0] == '\"' && s[s.size()-1] == '\"') + { + return s.substr(1, s.size()-2); + } + return s; +} + + // Write a DSW file to the stream void cmDSWWriter::WriteDSWFile(std::ostream& fout) { @@ -81,6 +91,7 @@ void cmDSWWriter::WriteDSWFile(std::ostream& fout) m_Makefile->AddUtilityCommand("ALL_BUILD", "echo", "\"Build all projects\"", false); std::string ctest = m_Makefile->GetDefinition("CMAKE_COMMAND"); + ctest = removeQuotes(ctest); ctest = cmSystemTools::GetFilenamePath(ctest.c_str()); ctest += "/"; ctest += "ctest"; |