[cmake-commits] hoffman committed cmDependsFortran.cxx 1.18.2.2 1.18.2.3 cmInstallCommand.cxx 1.10.2.3 1.10.2.4 cmMakefile.cxx 1.335.2.15 1.335.2.16 cmake.cxx 1.247.2.11 1.247.2.12

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Dec 17 17:41:00 EST 2007


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

Modified Files:
      Tag: CMake-2-4
	cmDependsFortran.cxx cmInstallCommand.cxx cmMakefile.cxx 
	cmake.cxx 
Log Message:
ENH: move changes from main tree


Index: cmDependsFortran.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortran.cxx,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -u -d -r1.18.2.2 -r1.18.2.3
--- cmDependsFortran.cxx	25 Oct 2007 18:03:48 -0000	1.18.2.2
+++ cmDependsFortran.cxx	17 Dec 2007 22:40:58 -0000	1.18.2.3
@@ -173,7 +173,8 @@
       makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod "
          << i->c_str() << " " << m.c_str() << ".mod.stamp\n";
       }
-    makeDepends << "\t at touch " << obj << ".provides.build\n";
+    makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj 
+                << ".provides.build\n";
     }
 
   /*

Index: cmInstallCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallCommand.cxx,v
retrieving revision 1.10.2.3
retrieving revision 1.10.2.4
diff -u -d -r1.10.2.3 -r1.10.2.4
--- cmInstallCommand.cxx	25 Oct 2007 18:03:48 -0000	1.10.2.3
+++ cmInstallCommand.cxx	17 Dec 2007 22:40:58 -0000	1.10.2.4
@@ -958,7 +958,8 @@
         }
 
       // Make sure the name is a directory.
-      if(!cmSystemTools::FileIsDirectory(dir.c_str()))
+      if(cmSystemTools::FileExists(dir.c_str()) &&
+         !cmSystemTools::FileIsDirectory(dir.c_str()))
         {
         cmOStringStream e;
         e << args[0] << " given non-directory \""

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.247.2.11
retrieving revision 1.247.2.12
diff -u -d -r1.247.2.11 -r1.247.2.12
--- cmake.cxx	25 Oct 2007 18:03:48 -0000	1.247.2.11
+++ cmake.cxx	17 Dec 2007 22:40:58 -0000	1.247.2.12
@@ -795,6 +795,8 @@
        "it\n"
     << "  tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n"
     << "  time command [args] ... - run command and return elapsed time\n"
+    << "  touch file                - touch a file.\n"
+    << "  touch_nocreate file       - touch a file but do not create it.\n"
 #if defined(_WIN32) && !defined(__CYGWIN__)
     << "  write_regv key value    - write registry value\n"
     << "  delete_regv key         - delete registry value\n"
@@ -939,6 +941,34 @@
         }
       return 0;
       }
+    // Touch file
+    else if (args[1] == "touch" && args.size() > 2)
+      {
+      for (std::string::size_type cc = 2; cc < args.size(); cc ++)
+        {
+        // Complain if the file could not be removed, still exists,
+        // and the -f option was not given.
+        if(!cmSystemTools::Touch(args[cc].c_str(), true))
+          {
+          return 1;
+          }
+        }
+      return 0;
+      }
+    // Touch file
+    else if (args[1] == "touch_nocreate" && args.size() > 2)
+      {
+      for (std::string::size_type cc = 2; cc < args.size(); cc ++)
+        {
+        // Complain if the file could not be removed, still exists,
+        // and the -f option was not given.
+        if(!cmSystemTools::Touch(args[cc].c_str(), false))
+          {
+          return 1;
+          }
+        }
+      return 0;
+      }
 
     // Clock command
     else if (args[1] == "time" && args.size() > 2)

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.335.2.15
retrieving revision 1.335.2.16
diff -u -d -r1.335.2.15 -r1.335.2.16
--- cmMakefile.cxx	25 Oct 2007 18:03:48 -0000	1.335.2.15
+++ cmMakefile.cxx	17 Dec 2007 22:40:58 -0000	1.335.2.16
@@ -1251,7 +1251,17 @@
       }
 
     }
+  std::string saveValue;
+  if(val)
+    {
+    saveValue = val;
+    }
+  // make ivalidate the const char* 
   this->GetCacheManager()->AddCacheEntry(name, val, doc, type);
+  if(val)
+    {
+    val = saveValue.c_str();
+    }
   this->AddDefinition(name, val);
 }
 



More information about the Cmake-commits mailing list