[QBS] setting windowsApiCharacterSet

Kurt Keller kk at parity-software.com
Mon Oct 28 09:25:33 CET 2013


Hi all,

when I have a simple project (which only depends on the 'cpp' module) I
can set windowsApiCharacterSet:undefined to get rid of the /DUNICODE and
/D_UNICODE defines on windows. 

But this does not work if there is an additional dependency to a other
module, which depends itself on 'cpp':

------------------- main.qbs
import qbs 1.0
Application {
  ...
  Depends { name: 'cpp' }
  Depends { name: 'myModule' }

  cpp.windowsApiCharacterSet: undefined
  ...
}

------------------- myModule.qbs
import qbs 1.0
Module {
  Depends { name: 'cpp' }
  ... // no further references to windowsApiCharacterSet here
}

In this example qbs generates compiler calls with \D_UNICODE and
\DUNICODE set. I can stop this only by inserting

  myModule.cpp.windowsApiCharacterSet: undefined

into the Application { ... } block.

What am I missing? Imho this is very impractical, because the writer of
the main QBS File must know the internals of myModule to specify compiler
flags correctly.

Is there a method to undefine or to unset compiler defines globally?


-- 
Best regards
Kurt Keller



More information about the Qbs mailing list