Why we can't change the name of CMakeLists.txt files ?

When CMakeLists.txt files get’s stacked in Visual Studio tab for example they are mess, I can only remember which is which by remembering a priority from left to right of “CMakeLists.txt” files on a tab…
I heard workaround of including CMakeLists into renamed file and keep that custom file in tab instead but that still a workaround, why not make CMakeLists.txt files somehow renamable , maybe not rename file itself if that is so hard to do, but rename it inside IDE itself, but that is VS’s side of work which they will not going to do I suppose… Or maybe make CMake files distinguishable by only extension like *.cmk
Anyway, just my few cents on CMake.

You’re not the only one with this issue, I have heard the same complaint before.

It is useful that the cmake files all have the same name, this makes them easy to find in the directory listing.
Maybe something like an additional naming scheme like “CML-<dir>.txt” or “CML-<dir>.cmake” ?
This would keep them in a directory listing basically in the same place as the “CMakeLists.txt”, and adding the name of the directory in which this CMakeLists.txt is located would make the name somewhat useful in tabs.
Although… you might end up with a lot of “CML-src.cmake” files, since they probably quite often live in a directory named “src” or smething similar.

Using the directoryname as part of the name would make it easy to implement: if no CMakeLists.txt exists, check for that second name.

Or an additional option for add_subdirectory() ?
like
add_subdirectory(src INFIX FooLibSrc)
would would then open
CML-FooLibSrc.cmake
or some similar naming scheme.
Using a common prefix would be useful IMO for two reasons: to make the files easier to find when looking for the CMakeLists.txt, and so they don’t have arbitrary names.

Alex

I think most correct decision would be to let CMake distinguish CMakeLists.txt file not by only its name (as it is) but also by its extension *.list or *.lst, and let users decide whether or not they want to rename file to something else… you can still keep CMakeLists.list or CMakeLists.lst or maybe even CMakeLists.txt, why not keep both extensions ? If you like CMakeLists.txt and that is easy for you to find them, then keep it like that, but for me having several “CMakeLists.txt” files on a tab all with same names is real pain…

CMakeLists.txt is not only used from CMake. Most moderen IDE’s are searching for this file.

It is the same like GNUmakefile, Makefile gmake and IDE’s are searching for.

And today, CMakePresets.json and CMakeUserPresets.json are also reserved file name with semantic!

ok good, but you are not breaking backward compatibility if you will leave CMakeLists.txt and in addition will add same
" and IDE’s are searching for" behavior for AnyName.lst or AnyName.cmk
which will be those CMakeLists.txt files but this time searched by their extension.