OpenMP in Qtcreator under Ubuntu 16.04


I would like to try to optimize an ofxBox2D app so i thought i would give OpenMP a try.

I tested under OSX El Capitan with XCode but it is a mess using omp under mac.
So i switch this app to Linux (Ubuntu 16.04)

I am using Qtcreator 3.6.1
The problem is : i don’t know how to include omp flags to the compiler under qtcreator. Every doc i saw is dealing with .pro files but i only see .qbs files now in qtcreator.

I tried to add a line in qbs file but it complains it doesn’t find the variable.

 of.cxxFlags: [-fopenmp]

Any clue ?

thanks a lot

you need to set the flags between quotes, the flags are just javascript arrays of strings:

of.cxxFlags: ['-fopenmp']

yes, this is it.
thanks a lot arturo

…and what is the line to modify to use it in command line ?

edit : opening a new thread

I’m trying to use openMP with QtCreator 4.6.1 and Mint 19.2 (so Ubuntu 18.04 I think). Anyway, I can compile and run from a terminal just fine after modifying config.make… But I’m having trouble with compiling inside of QtCreator, even after modifying the .qbs file with:

of.cxxFlags: ['-fopenmp']

So, any thoughts on how I can get openMP to work with QtCreator? Does it need a flag set for the linker too? Any thoughts are most appreciated.