summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-23 19:49:18 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-23 19:49:18 (GMT)
commit5d05b4484471c7087b66c711ca319914ad9883c8 (patch)
tree7eb6e00250c2ace03ee7f932c0494d1727259058
parent3bc0c4469ccd85bb0b0296885044b9b8724b216f (diff)
downloadCMake-5d05b4484471c7087b66c711ca319914ad9883c8.zip
CMake-5d05b4484471c7087b66c711ca319914ad9883c8.tar.gz
CMake-5d05b4484471c7087b66c711ca319914ad9883c8.tar.bz2
fixed quoted cmake
-rw-r--r--Source/cmake.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 918438c..5655274 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -145,18 +145,15 @@ void cmake::SetArgs(cmMakefile& builder, int ac, char** av)
// at the end of this CMAKE_ROOT and CMAAKE_COMMAND should be added to the cache
void cmake::AddCMakePaths(char **av)
{
-// Find our own exectuable.
-#if defined(_WIN32) && !defined(__CYGWIN__)
- std::string cMakeSelf = "\""+cmSystemTools::FindProgram(av[0])+"\"";
-#else
+ // Find our own exectuable.
std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
-#endif
// Save the value in the cache
- cmCacheManager::GetInstance()->AddCacheEntry("CMAKE_COMMAND",
- cMakeSelf.c_str(),
- "Path to CMake executable.",
- cmCacheManager::INTERNAL);
+ cmCacheManager::GetInstance()->AddCacheEntry
+ ("CMAKE_COMMAND",
+ cmSystemTools::EscapeSpaces(cMakeSelf.c_str()).c_str(),
+ "Path to CMake executable.",
+ cmCacheManager::INTERNAL);
// do CMAKE_ROOT, look for the environment variable first
std::string cMakeRoot;