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

[CMakeToolchain] Adding Xcode flags #10985

Merged

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Apr 6, 2022

Changelog: Feature: Added new configuration fields: tools.apple:enable_bitcode, tools.apple:enable_arc and tools.apple:enable_visibility.
Changelog: Feature: Added new mechanism to inject common Xcode flags in CMakeToolchain generator if enabled Bitcode, ARC, or Visibility configurations.
Closes: #9448
Docs: conan-io/docs#2506

conan/tools/apple/apple.py Outdated Show resolved Hide resolved
conan/tools/cmake/toolchain/blocks.py Outdated Show resolved Hide resolved
conan/tools/cmake/toolchain/blocks.py Outdated Show resolved Hide resolved
@franramirez688 franramirez688 added this to the 1.48 milestone Apr 7, 2022
@franramirez688
Copy link
Contributor Author

Basically, what I'm trying to do is to add some capabilities from the https://github.com/leetal/ios-cmake repository so we'll be able to add some common Xcode flags if those configurations are enabled/disabled.

@franramirez688 franramirez688 marked this pull request as ready for review April 7, 2022 16:21
Copy link
Contributor

@lasote lasote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to check the toolchain you used as a reference to understand a little bit but at first sight, this looks good.

conan/tools/cmake/toolchain/blocks.py Outdated Show resolved Hide resolved
conan/tools/cmake/toolchain/blocks.py Show resolved Hide resolved
conans/model/conf.py Outdated Show resolved Hide resolved
conan/tools/cmake/toolchain/blocks.py Show resolved Hide resolved
conan/tools/cmake/toolchain/blocks.py Outdated Show resolved Hide resolved
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at the comments

@franramirez688 franramirez688 force-pushed the feature/darwin_flags_improvement branch from a4163a6 to 82f9dc5 Compare April 25, 2022 12:14
@franramirez688 franramirez688 requested a review from lasote April 26, 2022 07:09
@MarkusWittlinger
Copy link

Hi @franramirez688 ,
I have a quick question (and I hope it is OK to comment here).
Is there a reason why the VISIBILITY is not passed to the CONAN_C_FLAGS but only to the C++ ones?

I had a look at the ios-cmake repo and there it is set for both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (see https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake).

@franramirez688
Copy link
Contributor Author

Hi @franramirez688 , I have a quick question (and I hope it is OK to comment here). Is there a reason why the VISIBILITY is not passed to the CONAN_C_FLAGS but only to the C++ ones?

I had a look at the ios-cmake repo and there it is set for both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (see https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake).

That's a very good question. It looks like a bug indeed 🤔 I don't remember why but it looks like it was missed...

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

Successfully merging this pull request may close these issues.

[feature] Improve CMakeToolchain support for xcode flags
6 participants