Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to prevent qmake from overriding my "QMAKE_CXXFLAGS+=-std=c++2a" option with c++1x? (macOS)
Forum Updated to NodeBB v4.3 + New Features

How to prevent qmake from overriding my "QMAKE_CXXFLAGS+=-std=c++2a" option with c++1x? (macOS)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 283 Views 2 Watching
  • 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by
    #1

    I cannot get my code (which needs c++2a) to compile on macOs because my option (QMAKE_CXXFLAGS+=-std=c++2a) gets overridden with -std=c++11 (or some other standard if CONFIG+=c++1x is used). The problem is that qmake appends whatever -std option it assumes AFTER my option, which overrides it. Which variable do I need to edit in my .pro file to remove the flag enforced by qmake?

    Editing mkspecs or other files from Qt distribution is not a solution, I need this to work on CI build servers like Travis.

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

      Hi,

      Why not use CONFIG += c++2a in 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

      1 Reply Last reply
      2
      • V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by
        #3

        @SGaist said in How to prevent qmake from overriding my "QMAKE_CXXFLAGS+=-std=c++2a" option with c++1x? (macOS):

        CONFIG += c++2a

        Wow, that worked. Somehow I thought Qt 5.14 doesn't support c++2a yet. Sorry, and thanks!

        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