Search code examples
c++iosxcodebuild

how xcodebuild to pass WARNING_CFLAGS to buildsettings


xcodebuild -project MyProj.xcodeproj -scheme MyLib WARNING_CFLAGS='-Wno-shorten-64-to-32

It seems like not workable...


Solution

    1. Go to Build Phases of your Xcode project.
    2. In compile sources, select all files you want to compress the error for
    3. Add -Wno-shorten-64-to-32 to the "Compiler Flags" column