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

Make very explicit what the tool does with CMakeLists #48

Open
pizzard opened this issue Dec 21, 2017 · 3 comments
Open

Make very explicit what the tool does with CMakeLists #48

pizzard opened this issue Dec 21, 2017 · 3 comments

Comments

@pizzard
Copy link

pizzard commented Dec 21, 2017

I started using the tool on my codebase recently and for some components I could make some improvements already.

But with bigger contexts the tool still struggles. I tried to find out why. As far as I can see, the tool is not able to handle the INCLUDE() Cmake directive correctly, so some crucial targets are missing and my depedency graph is wonky.

Is this support indeed missing?
Where would on start adding it?

@dascandy
Copy link
Contributor

The tool does not actually read the cmakefile at all; it uses its presence to mark a folder as a component, and scans it to see whether it's a library or an executable (defaulting to a library if it doesn't find it). The rest of the cmakefiles are completely ignored.

You can try adding empty files called "CMakeLists.txt" in the folders of other components to make it see a component there, or using the "--infer" flag to make it think of each folder with some sources as a component.

One alternative could be to actually read cmakelists, but that would make the tool much more complicated, tie it into CMake for its function, and would probably be fairly fragile by itself.

@pizzard
Copy link
Author

pizzard commented Jan 4, 2018

That should be added to the documentation, this requires you to have the definition as library or executable inside the cmake file directly and not hidden between further includes. Furthermore it requires you to never defines multiple targets in a CmakeLists.txt. Doesn't sound problematic once I know, would just be nice to add documentation about the expected project layout.

@dascandy dascandy changed the title Respect CMake include directives Make very explicit what the tool does with CMakeLists May 19, 2018
@dascandy
Copy link
Contributor

Changed the description to updating the documentation; for some reason many people think it actually reads the CMakeLists. To be completed together with adding support for other "build-style files" that demarcate components.

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

No branches or pull requests

2 participants