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

CMake Object Library #152

Closed
laprej opened this issue May 13, 2019 · 7 comments
Closed

CMake Object Library #152

laprej opened this issue May 13, 2019 · 7 comments

Comments

@laprej
Copy link
Member

laprej commented May 13, 2019

ADD_LIBRARY(ROSS_obj OBJECT ${ross_srcs})

Does this line add anything to our build? It is confusing Xcode, or rather, subsequent references to ROSS_obj are e.g., lines 133 and 138. This is documented here.

If no one has any objections, could we simply replace $<TARGET_OBJECTS:ROSS_obj> with ${ross_srcs} in both line 133 and 138?

@caitlinross
Copy link
Member

I don't have any objections, but should probably see what @gonsie says. It looks like she made that change in the build relatively recently, so maybe she has a specific reason for making that change?

@laprej
Copy link
Member Author

laprej commented May 13, 2019

@caitlinross agreed. Looks like a lot has been going on in these CMake files lately!

@gonsie
Copy link
Member

gonsie commented May 13, 2019

With these lines, we build the .o files once for both the static and shared libraries. Maybe you could try a newer version of cmake? It seem like there have been some bugs with the Xcode generator and generator expressions in the past.

@caitlinross
Copy link
Member

caitlinross commented May 13, 2019

Okay, so it's only because it's currently building both static and shared? In #149, it's been changed to only build one or the other and rely on Cmake to choose the correct one (based on the value of BUILD_SHARED_LIBS). So looks like we could go back to just a single ADD_LIBRARY call and don't create the object.

@laprej
Copy link
Member Author

laprej commented May 14, 2019

That sounds like a good solution as long as everyone else is happy with it. Once that PR is merged I can go make those changes.

@gonsie
Copy link
Member

gonsie commented May 14, 2019

I kind of want to build both static and shared all the time... but I guess that doesn't really make sense for how most people use ROSS (they most likely a user would not want to link to a system-provided ROSS).

@caitlinross
Copy link
Member

I went ahead and fixed it in the new release #149 @laprej.

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

3 participants