dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
41 stars 18 forks source link

[Enhancement] Let setup deletes existing build directory #209

Closed miroi closed 4 years ago

miroi commented 6 years ago

Hi Rado,

sometimes it would help is setup overwrites (delete and start again) the build directory so that we avoid "rm -rf build" before. What do you say ?

bast commented 6 years ago

I am not rejecting the idea but is this a problem? Do you need to do that often? We could avoid it but I try to understand the pros and cons first.

miroi commented 6 years ago

Well, for the sake of minimizing the number of unnecessary functionalities, I am rejecting this idea for now.

Because everybody can add "/bin/rm -rf build" before his setup command.

bast commented 6 years ago

I did not want to reject it. It is possibly a good idea. Just trying to figure out in which situation we need to remove the build directory?

miroi commented 6 years ago

In autocmake tests you had to attache date-time string to the build directory names because setup was not rewriting existing build directories.

bast commented 6 years ago

Aha - I see. Let's reopen it and think about it. Perhaps it is better if we allow overwriting.

miroi commented 6 years ago

Well, by default let do not overwrite. Rather, overwrite with special flag and with warning unto user: watch up that you do not destroy working build.

Buid/ directories might be large (DIRAC's case). In such cases overwrite seem be reasonable...

bast commented 4 years ago

I think the risk that I accidentally reset an existing build directory is bigger than the effort to remove the build directory first. We developers compile very often but users sometimes compile only twice a year and it would be annoying to get a build directory wiped by accidentally running setup.