Skip to content
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

Open
xycaleth opened this issue Aug 2, 2016 · 1 comment
Open

Refactor CMake files #859

xycaleth opened this issue Aug 2, 2016 · 1 comment

Comments

@xycaleth
Copy link
Member

xycaleth commented Aug 2, 2016

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

@ensiform
Copy link
Member

ensiform commented Oct 19, 2016

https://github.com/ttroy50/cmake-examples

I found this as a possible tutorial help too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants