From 9f2790d3e7e5a1e8e564d7f670fe2ff8b28cf6e6 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 7 Jan 2008 14:52:45 -0500 Subject: 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 --- Source/cmFileCommand.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6186596..c03bf71 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1614,9 +1614,11 @@ bool cmFileCommand::ParseInstallArgs(std::vector const& args, // 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. -- cgit v0.12