Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to disable clang warnings in iOS build

How to disable clang warnings in iOS build

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andreas E.
    wrote on last edited by
    #1

    Hi,

    I am unable to disable certain compilation warnings when building for iOS. I added various -Wno-... options to QMAKE_CXXFLAGS. However, qmake always adds -Wall at the end of the command line, so all my extra flags are ignored. This seems to happen on every project. Where does this come from and how can I fix this?

    I am currently using Qt 5.11.2 and Qt Creator 4.7.1

    Thanks a lot.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What values do you want to disable ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What values do you want to disable ?

        A Offline
        A Offline
        Andreas E.
        wrote on last edited by
        #3

        @SGaist currently my QMAKE_CXXFLAGS contain
        -Wno-unused-local-typedefs
        -Wno-ignored-qualifiers
        -Wno-unused-function
        -Wno-unused-but-set-parameter
        mostly for macro-generated code.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you show your .pro file ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • SGaistS SGaist

            Can you show your .pro file ?

            A Offline
            A Offline
            Andreas E.
            wrote on last edited by
            #5

            @SGaist This happens with every .pro file. You can check this with any example. "-Wall" will always be added near the end of the clang command line after the QMAKE_CXXFLAGS.

            ekkescornerE 1 Reply Last reply
            0
            • A Andreas E.

              @SGaist This happens with every .pro file. You can check this with any example. "-Wall" will always be added near the end of the clang command line after the QMAKE_CXXFLAGS.

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #6

              @Andreas-E. some time ago I had many unwanted warnings from iOS build and this was the way to suppress them
              .pro:

                  disable_warning.name = GCC_WARN_64_TO_32_BIT_CONVERSION
                  disable_warning.value = NO
                  QMAKE_MAC_XCODE_SETTINGS += disable_warning
              

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.8 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              A 1 Reply Last reply
              1
              • ekkescornerE ekkescorner

                @Andreas-E. some time ago I had many unwanted warnings from iOS build and this was the way to suppress them
                .pro:

                    disable_warning.name = GCC_WARN_64_TO_32_BIT_CONVERSION
                    disable_warning.value = NO
                    QMAKE_MAC_XCODE_SETTINGS += disable_warning
                
                A Offline
                A Offline
                Andreas E.
                wrote on last edited by
                #7

                @ekkescorner This is not working, "-Wall" will still override those settings.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved