-
Notifications
You must be signed in to change notification settings - Fork 959
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
[feature] Improve CMakeToolchain support for xcode flags #9448
Comments
To discuss:
|
Yes, probably
I have been trying to push the idea of generic CFLAGS, CXXFLAGS injection via |
I think yes, we should at least start by supporting something generic like cflags and see later if we create specific [conf] entries for higher-level stuff. |
I'm moving this to Done as the look into of 1.40 and assigning to 1.41. |
all apple cmake flags, like bitcode is very well handled by that: https://conan.io/center/ios-cmake |
Are you sure about that? I've used those flags for simulators as well. |
I have written a linter for conan packages that checks the generated binaries if they contain bitcode, since I wanted to get that error after package creation, not on consumtion The actually problem we have with the iOS/tvOS/watchOS build is that the conan docs are not mentioning the ios-cmake toolchain, and that recipes with custom/other builds need to handle that internal , openssl and libcurl for example. In doubt , they always should generate bitcode, because soon that will be required for devices anyway, and other builds do not care. |
Addressed on problem and added some docs for the iOS toolchain, This should (hopefully) show and explain a bit more details |
Hi, Bitcode is only for apple recompile your application and delivery smaller size app (store or adhoc): So, i've disabled it for simulators too: @a4z Your solution is good, be all flags need affect dependencies too. All options/flags from ios-cmake need be passed to all dependencies, like here: |
Yes, of course, you are supposed to rebuild all the conan packages you use with the same profiles, so all dependencies are compatible, but this is how you do it (hopefully) anyway with conan. bitcode is required for watch and tvos, I think, for iOS it is optional (for now) I think you do not need to omit the bitcode flag for the x86_64 simulator, it will just have no effect. |
Just for reference, the mentioned package |
Yes, ios-cmake is the defacto default to build native things since years when it comes to cmake, that's why I added it to the cci. |
Note: Look into combine external toolchains with the conan one. |
I am not sure what you referring to exactly |
Internal note |
Hi, As I use my day-to-day compilation of things for Apple (iOS, watchOS, tvOS), mainly in the Ezored project (https://github.com/ezored/ezored) and several people and companies use my project and do the same thing as me, what makes the most sense is that the flags are passed to all libs at once, as you can't have one lib compiled with bitcode and one without, as this generates a compilation error. We've been doing this for years and I don't see why I keep setting these flags by dependencies, as they need to be for everyone. Any news about this problem? Thanks |
Hi. Any news about it? Thanks. |
Yes, any updates? We desperately need to be able to build on iOS... |
Hi @gegles, I think no one has focus on it :( What im doing to solve this problem is using the Thanks. |
Hi @gegles This open issue is for some extra flags, but the standard support for Xcode is already there. We have tests in our tests suite that cross-compile for iOS and M1 for example:
So it is not that it is not possible to build for XCode, for OSX, iOS, but for more complete support for some things like CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE. So far it seems @paulo-coutinho mentioned ezored toolchain package can help with this. This has been difficult to get some time to integrate in the CMakeToolchain, but it is in the backlog, hopefully we will be able to get some time for this soon. |
not exactly true, for me things worked quite will on Mac, with the info I shared. It is of course unfortunate that conan team decided to ignore the info I contributed as a PR to the conan docs, However, the main question might be, what is your actual problem you need to solve and the solution is missing? |
Thanks @paulo-coutinho and @memsharded! I was actually running into bitcode issues... but:
My issues are now on the Android side of things... I cannot seem to make the |
Hi @gegles, I made a project that have all of this problem solved: Im using openssl Android things are built without problems too. My android profile on ezored:
Maybe it help you. |
Hi, There is something new to this problem on recent releases? Thanks. |
I'm working on trying to bring those Xcode flags (based on |
Implemented in #10985, will be in next 1.48 |
It was solved and is used in my new project: Thanks a lot! |
Thanks for the feedback @paulocoutinhox ! |
Coming from conan-io/conan-center-index#5545
The
darwing-toolchain
generator recipe used to provide some useful configurable apple flags: https://github.com/ezored/conan-darwin-toolchain/blob/stable/1.3.0/conanfile.py#L87-L127We should take a look at the cmake flags used there and see if we can improve the integration for cmake apple-clang projects
cc/ @theodelrieu @paulo-coutinho
The text was updated successfully, but these errors were encountered: