mcandre / toys

code demos for newbies
https://github.com/mcandre/toys
30 stars 6 forks source link

cclean #430

Closed mcandre closed 1 year ago

mcandre commented 1 year ago

Write a shim to clean up after cmake's junk files.

Debating whether to do this in C++ or Rust.

Rust has better community supported mechanisms for porting apps to multiple platforms, via cross and crit. snek is somewhat fragile, and targets a more limited set of platforms.

Another advantage of Rust is incredibly easy provisioning via cargo, even and especially when OS distribution packages do not yet exist for cclean.

Have cclean begin by running the cmake global clean task. Ignore the exit status. Hide the output by default.

Namely, ensure the .ninja-log, the worst offender, is deleted.

Then identify and delete the application output directory.

Then delete other commonly cmake generated file paths.

Handle an optional -B flag to declare a distinct cmake binary directory. When present, simplify deletion by deleting this directory after running the global clean task.

Test cclean when cmake integrates with make, ninja, and MSVC.

Publish ports of cclean.

Update swiper, snek, and rez to use cclean.

In swiper and snek, drop rez.