Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable XCode BITCODE within a CMake project?

I am building a medium size project that uses CMake for project generation. On the XCode 7+ the ENABLE_BITCODE option is set to "Yes" by default. I would like to set that to "No" by default in my generated XCode projects.

I have tried adding "-fno-embed-bitcode" and "-fno-embed-bitcode-marker" to my CMAKE_C_FLAGS but this had no effect.

like image 945
Joe Steele Avatar asked Nov 11 '15 21:11

Joe Steele


1 Answers

Turns out I did not search enough. You can do this by calling:

set_target_properties(target PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")

from your CMake project.

like image 117
Joe Steele Avatar answered Sep 19 '22 15:09

Joe Steele