Detect clang or gcc compiler in .pro



  • Guys.. I need to know if I'm compiling with clang or with gcc, and depending on it, I need to enable or disable some options

    how can I do that in the .pro file ??

    regards


  • Moderators

    try the following:

    *-g++ {
        ...
    }
    *-clang++ {
        ...
    }
    

    or

    equals(QMAKE_CXX, g++) {
        ...
    }
    equals(QMAKE_CXX, clang++) {
        ...
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.