Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Qt Creator 4 + Cmake + c++14 + OSX bug ?

    Tools
    qtcreator 4.0.0 cmake c++14 osx
    1
    1
    951
    Loading More Posts
    • 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.
    • Nuno Nunes
      Nuno Nunes last edited by Nuno Nunes

      I have a c++14 project that uses Cmake in OSX and I use QtCreator 4.0.0.

      In Cmake until now I used the following code to specify the c++14 standard

      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++")

      With Qt 5.7 I cannot use "-std=c++14" because of an problem with Cmake (qt 5.7 defines allready "-std=c++11" that is incompatible with previous code)

      So now (with Qt 5.7) I must use the following code in Cmake:
      set (CMAKE_CXX_STANDARD 14)

      It works Ok, so no problem here. The problem is with this last code the QtCreator editor (with clang code model) does not identifies the model code as c++14 and gives errors if I use std::make_unique (for example); Wen I used "-std=c++14" the editor gives no error.

      Is this a bug in QtCreator or there is another way to define c++14 code model in QtCreator ?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post