[Qbs] How to add -pthread option into projects? a bug in qbs ?
richard at weickelt.de
Fri Jul 5 14:24:24 CEST 2019
> My next question is how to fix the bug in conan qbs generator? driverFlags
> does not exist in conan qbs generator.
You can either
1. Wait for this fix to be integrated:
2. Modify the Qbs generator in your Conan installation
3. Implement your own Qbs generator into the project you want to build.
The cpp_info object model of Conan is very limited. Conan does not know about
driver flags and I doubt it will any time soon. So there is not much we can do
about that. I don't think it is dangerous to put -pthread into cpp.cxxFlags
although it is not entirely correct either. You can try to add -pthread to
cpp.driverFlags in your product. That might result in doubling -pthread on the
command line since it is applied by cxxFlags as well. If the compiler (g++?)
complains, you can also use cpp.driverLinker flags instead. This will apply
-pthread only to the invocation of the linker driver. The compiler is then
covered by cpp.cxxFlags provided by the dependency.
More information about the Qbs