I have a CMakeLists.txt file that builds an executable and includes add_subdirectory() calls to build a series of dynamic libraries - one per subdirectory. This runs on Linux and uses the Ninja generator.
With this we can, of course, do a clean build using:
Is it possible to do a clean of one specific subdirectory?
I realise I could just delete the appropriate object code folder in CMakeFiles, but I wondered whether there is a more elegant way?