CPackIFW: refactor cmCPackIFWGenerator::PackageFiles()
Pr. now, cmCPackIFWGenerator::PackageFiles()
(amongst other things) builds arguments to and runs repogen
. Ditto for binarycreator
. I suggest to refactor out those two actions into four private cmCPackIFWGenerator
methods, for the sake of readability and maintainability:
std::vector<std::string> cmCPackIFWGenerator::BuildRepogenCommand()
std::vector<std::string> cmCPackIFWGenerator::BuildBinaryCreatorCommand()
int cmCPackIFWGenerator::RunRepogen(const std::string &logfile)
int cmCPackIFWGenerator::RunBinaryCreator(const std::string &logfile)
The resulting functions will be concise and have a clear purpose. Apart from BuildBinaryCreatorCommand
, all the resulting functions will have between 22 and 50 lines of code. BuildBinaryCreatorCommand
will consist of 87 lines of code.
Let me know what you think.