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

Target dependencies are broken for "make all_unity"? #77

Open
kecsap opened this Issue Oct 25, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@kecsap

kecsap commented Oct 25, 2015

Hi,

I tried to apply the latest Cotire for my project, but the target dependencies are completely broken if I try to use unity build. My targets are in different subdirectories and the dependencies are specified with add_dependencies(). I execute: "make all_unity". I cotired almost all of my targets.

@sakra

This comment has been minimized.

Owner

sakra commented Oct 26, 2015

For the generated unity target, cotire can only copy target dependencies established through target_link_libraries. CMake does not provide a way to obtain target dependencies specified with add_dependencies. As a work-around, you have to set up necessary unity target dependencies manually.

@gjasny

This comment has been minimized.

Contributor

gjasny commented Jun 25, 2016

Let me try to add a dependency getter to CMake 3.7. I have also a test case available at gjasny/cotire@4f1b898

CC: @grover

@gjasny

This comment has been minimized.

Contributor

gjasny commented Jun 25, 2016

I wrote a PoC getter for the utility dependencies in CMake: gjasny/CMake@f85065a

You can retrieve the deps via get_target_property(_deps example DEPENDENCIES). Where would you add that information in cotire.cmake?

@gjasny

This comment has been minimized.

Contributor

gjasny commented Jun 26, 2016

@gjasny

This comment has been minimized.

Contributor

gjasny commented Jan 20, 2017

This just got merged into CMake master: https://gitlab.kitware.com/cmake/cmake/merge_requests/407

@gjasny

This comment has been minimized.

Contributor

gjasny commented Apr 24, 2017

The MANUALLY_ADDED_DEPENDENCIES property has been released with CMake 3.8.0

@xaxxon

This comment has been minimized.

xaxxon commented Oct 20, 2017

Just had to work around this. I'd love to see this supported.

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