Selecting quality CMake code example(s)

In a related question a suggestion was made to create list of quality CMake code examples.

One GitHub repository that while large seems to meet the criteria is

GitHub query for just the CMake code.

As I am new to using CMake, still working through the tutorial, can others here weight in on if this repo is using quality CMake code so that I can include it in my list.

Qt does some pretty advanced, complex and unconventional things. Some of that has to do with its desire to support things that qmake did, others are a consequence of its plugin architecture and the desire to automate various things for the developer. I wouldn’t generally recommend it as a tutorial sample, if for no other reason than the significant complexity.

2 Likes

Thanks.

I am not necessarily looking for a tutorial example but code that does it correctly, period.

In learning CMake I am coming to understand that finding things is an important part and qt/qtbase seems to have a lot of that.

Did not know that Qt had its own make tool, but then never programmed in Qt. Will take into consideration when looking at their code.


On a side note, learned a lot from

Deep CMake for Library Authors - Craig Scott - CppCon 2019

and like the Recommended Practices in your book, “Professional CMake A Practical Guide” :slightly_smiling_face:

I have a project of relative small size and (I hope) good CMake quality. I hope it helps:

Is PCRE2 (Perl-Compatible Regular Expressions) an example of quality CMake code?

CMakeLists.txt
CMake directory