[CMake] Which style of file extension is better for optional CMake files?

David Cole david.cole at kitware.com
Wed Oct 12 09:07:16 EDT 2011


On Wed, Oct 12, 2011 at 12:16 AM, Ryuan Choi <ryuan.choi at samsung.com> wrote:
> Dear CMake Developers,
>
> Can I know which style is more closed to CMake style?
> a) CMakeLists.txt and PlatformXXX.cmake for optional platform specific source lists in same folder.
> b) CMakeLists.txt and CMakeListsXXX.cmake in same folder.
>
> Because there are many platform specific files in my project, CMakeLists.txt should be seperated.
> I'd like to know which one is better and fix them better way.
>
> Below is related bug and you can see more information.
> https://bugs.webkit.org/show_bug.cgi?id=56705
>
> Best Regards,
> Ryuan Choi
> --
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>

I think it's mostly a matter of style... so you could go either way.

Personally, I would choose the "PlatformXXX.cmake" names over the
other ones. The other ones are too close to "CMakeLists.txt" and could
be confused for them by a quick scan of the file name. So, for human
readability and understanding, I would prefer the PlatformXXX.cmake
names.


HTH,
David


More information about the CMake mailing list