#340 eliminate unnecessary calls to CPack