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
This commit is contained in:
Alexander Neundorf 2008-01-07 14:52:45 -05:00
parent e73508aa65
commit 9f2790d3e7
1 changed files with 5 additions and 3 deletions

View File

@ -1614,9 +1614,11 @@ bool cmFileCommand::ParseInstallArgs(std::vector<std::string> 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.