[cmake-commits] alex committed CMakeLists.txt 1.368 1.369 cmake.cxx 1.312 1.313

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 25 10:57:35 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9391/Source

Modified Files:
	CMakeLists.txt cmake.cxx 
Log Message:

ENH: add an empty debian package generator, Mathieu volunteered to fill it
:-)

Alex


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.368
retrieving revision 1.369
diff -u -d -r1.368 -r1.369
--- CMakeLists.txt	18 Jul 2007 14:19:33 -0000	1.368
+++ CMakeLists.txt	25 Jul 2007 14:57:33 -0000	1.369
@@ -302,6 +302,7 @@
   CPack/cmCPackZIPGenerator.cxx
   CPack/cmCPackCygwinBinaryGenerator.cxx
   CPack/cmCPackCygwinSourceGenerator.cxx
+  CPack/cmCPackDebGenerator.cxx
   )
 # Build CPackLib
 ADD_LIBRARY(CPackLib ${CPACK_SRCS})

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -d -r1.312 -r1.313
--- cmake.cxx	18 Jul 2007 14:19:33 -0000	1.312
+++ cmake.cxx	25 Jul 2007 14:57:33 -0000	1.313
@@ -690,10 +690,17 @@
 // cache
 int cmake::AddCMakePaths(const char *arg0)
 {
-  // Find our own executable.
+  // Find the cmake executable
   std::vector<cmStdString> failures;
   std::string cMakeSelf = arg0;
   cmSystemTools::ConvertToUnixSlashes(cMakeSelf);
+  if ((strstr(arg0, "cpack")!=0) || (strstr(arg0, "ctest")!=0))
+    {
+    // when called from cpack or ctest CMAKE_COMMAND would otherwise point
+    // to cpack or ctest and not cmake
+    cMakeSelf = cmSystemTools::GetFilenamePath(cMakeSelf) +
+      "/cmake" + cmSystemTools::GetFilenameExtension(cMakeSelf);
+    }
   failures.push_back(cMakeSelf);
   cMakeSelf = cmSystemTools::FindProgram(cMakeSelf.c_str());
   cmSystemTools::ConvertToUnixSlashes(cMakeSelf);
@@ -746,6 +753,12 @@
     editCacheCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
       "/CMakeSetup" + cmSystemTools::GetFilenameExtension(cMakeSelf);
     }
+  if(cmSystemTools::FileExists(editCacheCommand.c_str()))
+    {
+    this->CacheManager->AddCacheEntry
+      ("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
+       "Path to cache edit program executable.", cmCacheManager::INTERNAL);
+    }
   std::string ctestCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
     "/ctest" + cmSystemTools::GetFilenameExtension(cMakeSelf);
   if(cmSystemTools::FileExists(ctestCommand.c_str()))
@@ -754,11 +767,13 @@
       ("CMAKE_CTEST_COMMAND", ctestCommand.c_str(),
        "Path to ctest program executable.", cmCacheManager::INTERNAL);
     }
-  if(cmSystemTools::FileExists(editCacheCommand.c_str()))
+  std::string cpackCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
+    "/cpack" + cmSystemTools::GetFilenameExtension(cMakeSelf);
+  if(cmSystemTools::FileExists(ctestCommand.c_str()))
     {
     this->CacheManager->AddCacheEntry
-      ("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
-       "Path to cache edit program executable.", cmCacheManager::INTERNAL);
+      ("CMAKE_CPACK_COMMAND", cpackCommand.c_str(),
+       "Path to cpack program executable.", cmCacheManager::INTERNAL);
     }
 
   // do CMAKE_ROOT, look for the environment variable first



More information about the Cmake-commits mailing list