How to pass nonfragile-abi flag to cmake?

420 views Asked by At

I would like to create an install script for objectiveC with arc and dispatch_queue support for Raspberry Pi. This script will be open sourced in github. Right now lots of the progress is working. But while installing libobjc2 the compiler complains:

error: -fobjc-arc is not supported with fragile abi

I know that I have to set the -fobjc-nonfragile-abi flag to the clang compiler. Unfortunately I don't know lot about cmake and how to pass arguments to cmake.

This is suggested by GNUstep and works until the error appears:

cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

How do I tell cmake using the command line to use the "-fobjc-nonfragile-abi" flag?

1

There are 1 answers

0
Joel On BEST ANSWER

You can always append defines like that with SET: SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-nonfragile-abi") But I haven't use clang, so It's only a guess one