Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Choose non-default compiler for my CMake project in QtCreator
Qt 6.11 is out! See what's new in the release blog

Choose non-default compiler for my CMake project in QtCreator

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.8k Views 1 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.
  • N Offline
    N Offline
    normanius
    wrote on last edited by
    #1

    How to choose a specific compiler to be used in a CMake project.
    I'm developing on Mac OS 10.9.4 using Qt Creator v3.2.1 and want to use a special OMP compatible gcc compiler (gcc-mp-4.8).

    I'm aware of the "Compilers" and "Kits" sections in the Build & Run options. However, if I introduce my special compiler and choose the kit of my choice, it still won't use the compiler that I've specified.

    If I check the CMakeCache.txt (with ccmake) I see that the default c++ compiler is in use: /usr/bin/c++
    If I build the CMake source directly with CMake (outside of Qt Creator) everything works well:
    @CC=gcc-mp-4.8 CXX=g++-mp-4.8 cmake <path/to/CMakeLists.txt>@

    What did I do wrong that QtCreator does not apply my choice?

    Here are some screenshots of the relevant qtcreator settings:
    Compilers: http://share.pho.to/7d8HW
    Kits: http://pho.to/7d8LY
    Build CMake project: http://pho.to/7d8NB

    Thanks for any sort of help!

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

      Hi,

      Did you also compile a version of Qt with that compiler ? (Just guessing here)

      You should also try the qt-creator IRC channel/mailing list. You'll find there Qt Creator's developers/maintainers (this forum is more user oriented)

      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
      0
      • N Offline
        N Offline
        normanius
        wrote on last edited by
        #3

        I don't need Qt for this specific project, hence I've set the Qt Version to None in my kit (see screenshot). Thanks for the hint with the IRC channel. Will try to send a message there.

        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