-
Notifications
You must be signed in to change notification settings - Fork 630
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
Build for mac using cmake to Xcode fails to compile #455
Comments
Could you link a report on the kitware site? The OpenSubdiv site mentions a problem, but not the particulars. |
There are a few, but these two are good representative issues: If I remove the ability for both types of libraries at once using the object library mechanism, it seems to work ok, maybe I'll just do that when the xcode generator is running... |
… apple Per the docs, add_library calls with only object library dependencies are not yet handled properly by Xcode and similar. Disable the use of object libraries as a compilation speedup mechanism as a result. Similarly, disable under win32 when building both types of libs to avoid exported symbols in the static libs. Finally, use same mechanism to avoid extra layer of libs in generated exports when only building one config on all platforms Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Found the single sentence in the add_library docs in the official docs saying what I was doing isn't going to work for xcode for now, so just changed the mechanism, so if you are building both static and shared libraries under xcode, you'll have to incur a double compile for the time being |
Thanks for the links; I understand the problem now. Trying to make it work would involve shenanigans to little gain, that's for sure. |
… apple Per the docs, add_library calls with only object library dependencies are not yet handled properly by Xcode and similar. Disable the use of object libraries as a compilation speedup mechanism as a result. Similarly, disable under win32 when building both types of libs to avoid exported symbols in the static libs. Finally, use same mechanism to avoid extra layer of libs in generated exports when only building one config on all platforms Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
Mac builds work fine if you run with makefiles or ninja generator, but if you generate for Xcode, the builds fail. However, it seems to be an issue with dependencies between the build stages generated by cmake (i.e. generating the headers, the libraries, etc.), and if you go through the dependency chain manually, each successive step can build. Based on the bug reports on cmake.org / kitware, it appears to be an issue with the object library mechanism, and some build-artifact thing that Xcode does. There does not seem to be anything code-wise to be done until cmake fixes the issue, however we should probably document this known failure case.
OpenSubdiv has explicitly warned against building using Xcode due to the same issues:
https://graphics.pixar.com/opensubdiv/docs/cmake_build.html
The text was updated successfully, but these errors were encountered: