Summary
In this chapter, we learned how to structure a CMake project to support reusability. We learned how to implement CMake utility modules, how to share them, and how to use utility modules written by others. Having the ability to leverage CMake modules enables us to better organize our projects and better collaborate with our team members in unison. CMake projects will be much easier to maintain with this knowledge on hand. Common, reusable code between CMake projects will grow into an extensive collection of useful modules that make writing projects with CMake easier.
I want to remind you that CMake is a scripting language and should be treated as such. Use software design principles and patterns to make CMake code more maintainable. Organize your CMake code into functions and modules. Reuse and share CMake code as much as possible. Please do not neglect your build system code, or you may have to write it from scratch.
In the next chapter, we will be learning about ways...