Supporting CMake in kondo

Hey! I maintain an open source polyglot project cleaning tool called kondo. Picture attached for clarity

kondo has had very basic support for cmake projects for a while, however with v2 of the project underway I’m looking to expand support to as many different ways of using cmake as possible. It would be great to get feedback from actual cmake users if possible :grinning:

A user helpfully described numerous ways of using cmake in this issue thread. I want to know which of these is the most common or standard use of cmake. I’ve inlined the relevant section below.

# All of these are valid ways to configure the project, even simultaneously.
(mkdir build && cd build && cmake ..)                    # 1. Currently supported.
(mkdir _ && cd _ && cmake ..)                            # 2. Unsupported.
(mkdir build/config1 && cd build/config1 && cmake ../..) # 3. Unsupported.
(mkdir /tmp/build && cd /tmp/build && cmake /project/)   # 4. Unsupported, assumes project tree in `/project/`.
cmake .                                                  # 5. Unsupported.

Secondly, how prevalent is the use of the clean target? I ran through the cmake tutorial and saw one was generated for me.

Is clean something I could expect the majority of cmake projects to have? kondo currently performs all clean logic itself, though I am investigating shelling out to tools like cmake to invoke their logic if the user desires. Would that behaviour be expected or preferred from your perspective?

Thank you for your time, Trent :slight_smile: