[cmake-commits] alex committed cmFileCommand.cxx 1.94 1.95

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 7 14:52:47 EST 2008


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

Modified Files:
	cmFileCommand.cxx 
Log Message:
BUG: with cmake 2.4 INSTALL_FILES() with no files was accepted by cmake,
with cmake cvs without this patch an invalid cmake_install.cmake script was
generated in this case, it failed with an error if no files were given. So
just do nothing if no files are listed to make it compatible.

http://lists.kde.org/?l=kde-commits&m=119965185114478&w=2

Alex


Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- cmFileCommand.cxx	4 Jan 2008 19:22:57 -0000	1.94
+++ cmFileCommand.cxx	7 Jan 2008 19:52:45 -0000	1.95
@@ -1614,9 +1614,11 @@
     // now check and postprocess what has been parsed
     if ( files.size() == 0 )
       {
-      this->SetError(
-                     "called with inapropriate arguments. No FILES provided.");
-      return false;
+      // nothing to do, no files were listed.
+      // if this is handled as error, INSTALL_FILES() creates an invalid
+      // cmake_install.cmake script with no FILES() arguments if no files were
+      // given to INSTALL_FILES(). This was accepted with CMake 2.4.x.
+      return true;
       }
 
     // Check rename form.



More information about the Cmake-commits mailing list