-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor CMake files #859
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our CMakeLists.txt files at the moment are a pretty big mess with some dependencies defined at the top level, even when not all projects need those dependencies. You can't choose to build one or two projects without going through the process of ticking/unticking a lot of boxes.
Good use of CMake should each each project to be built standalone, but currently this isn't possible because they all rely on the top-level project. I reckon there should be a "Common.cmake" file in the CMakeModules/ folder and then each project's CMakeLists.txt then includes this file to get all of the compiler settings, defines, etc. The job of the top-level CMakeLists.txt file is then to simply add the projects you choose to add.
Here are some good links on good use of CMake:
https://rix0r.nl/blog/2015/08/13/cmake-guide/
http:https://www.slideshare.net/DanielPfeifer1/cmake-48475415
The text was updated successfully, but these errors were encountered: