[Interest] How make qmake set build settings for iOS to avoid manual Xcode "Update to recommended settings” ?

Edward Sutton edward.sutton at subsite.com
Wed Apr 29 22:02:14 CEST 2015


When Xcode 6.3.1 opens an Xcode project created by Qt, it has issues when Product->Analyze checker is executed.

Under issue “Validate Project Settings” it recommends “Update to recommended settings”
   -  These issues are compiler flags.

I fixed another issue using QMAKE_IOS_DEPLOYMENT_TARGET and QMAKE_IOS_TARGETED_DEVICE_FAMILY.

None of the QMAKE_IOS_GCC_WARN* variables are seen the Qt Creator Compile Output window. They have no effect on the Xcode project.



    # Set "Target"

    QMAKE_IOS_DEPLOYMENT_TARGET = 6.0


    # Set "Devices" (2=iPad Only)

    # Note for devices: 1=iPhone, 2=iPad, 1,2=Universal.

    QMAKE_IOS_TARGETED_DEVICE_FAMILY = 2




    # These

    QMAKE_IOS_CLANG_WARN_BOOL_CONVERSION = YES

    QMAKE_IOS_CLANG_WARN_CONSTANT_CONVERSION = YES

    QMAKE_IOS_CLANG_WARN_EMPTY_BODY = YES

    QMAKE_IOS_CLANG_WARN_ENUM_CONVERSION = YES

    QMAKE_IOS_CLANG_WARN_INT_CONVERSION = YES

    QMAKE_IOS_CLANG_WARN_UNREACHABLE_CODE = YES

    QMAKE_IOS_CLANG_WARN__DUPLICATE_METHOD_MATCH = YES


    QMAKE_IOS_GCC_WARN_64_TO_32_BIT_CONVERSION = YES

    QMAKE_IOS_GCC_WARN_ABOUT_RETURN_TYPE = YES

    QMAKE_IOS_GCC_WARN_UNDECLARED_SELECTOR = YES

    QMAKE_IOS_GCC_WARN_UNINITIALIZED_AUTOS = YES

    QMAKE_IOS_GCC_WARN_UNUSED_FUNCTION = YES

    QMAKE_IOS_GCC_WARN_UNUSED_VARIABLE = YES


When I let Xcode fix and “Update to recommended settings”, the diff between the project.pbxproj and project-fixed.pbxproj files are basically:

CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0;
DYLIB_CURRENT_VERSION = 1.0.0;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;

Has anyone figured out how to pass these from make to Xcode project?

-Ed


This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150429/5f8edee7/attachment.html>


More information about the Interest mailing list