Skip to content

[CMakeToolchain] Adding Xcode flags - #10985

Merged
memsharded merged 7 commits into
conan-io:developfrom
franramirez688:feature/darwin_flags_improvement
Apr 26, 2022
Merged

memsharded merged 7 commits into
conan-io:developfrom
franramirez688:feature/darwin_flags_improvement

Conversation

@franramirez688

@franramirez688 franramirez688 commented Apr 6, 2022

Copy link
Copy Markdown
Contributor

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

Comment thread conan/tools/cmake/toolchain/blocks.py Outdated
Comment thread conan/tools/cmake/toolchain/blocks.py Outdated
Comment thread conan/tools/apple/apple.py Outdated
Comment thread conan/tools/cmake/toolchain/blocks.py Outdated
Comment thread conan/tools/cmake/toolchain/blocks.py Outdated
@franramirez688 franramirez688 added this to the 1.48 milestone Apr 7, 2022
@franramirez688

Copy link
Copy Markdown
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

@lasote lasote left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread conan/tools/cmake/toolchain/blocks.py Outdated
Comment thread conan/tools/cmake/toolchain/blocks.py
Comment thread conans/model/conf.py Outdated
Comment thread conan/tools/cmake/toolchain/blocks.py
Comment thread conan/tools/cmake/toolchain/blocks.py Outdated

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown

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
Copy Markdown
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