Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-875

Diamond-style Depends leads to overduplicating defines in command line.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 1.5.0
    • 1.4.2
    • General
    • None
    • b780a7f6960fa0279e66fdffe84b1b94521bac6e

    Description

      Suppose we have common system library, like boost.
      We have configured it with custom defines (a lot of) and then we place these defines in Export section of boost.

      Then, we create dozens of small non-linked libraries, depended on boost.
      We simply add Depends

      {name: "boost"}

      , getting includePaths and defines. All ok.

      Finally, we create An application, depending on all of these libs. As they use boost in includes, they export boost too. So we have dozen of duplicated boost's defines (it's not a joke... 8 defines and 12 duplications =~ 100 arguments on command line).

      I created simple application to illustrate the problem.
      Just compile it in qt creator until it stops on compilation error. On command line:

      E:\SOFT\MSVC2010\VC\BIN/cl.exe /nologo /c /EHsc /Zi /MDd /IE:\prj2010\test1\boost_emul /IE:\prj2010\test1\lib1 /IE:\prj2010\test1\lib2 /IE:\prj2010\test1\boost_emul /DUNICODE /D_UNICODE /DBOOST_ENABLE_SOME /DBOOST_DISABLE_SOME /DLIB_DEF /DLIB_DEF /DBOOST_ENABLE_SOME /DBOOST_DISABLE_SOME "/DWINVER=0x500" "/D_WIN32_WINNT=0x500" "/D_WIN32_WINDOWS=0x500" /FoE:\prj2010\test1\qtc_Qt4_MSVC_dd58c174-debug\app1.qtc-Qt4-MSVC-dd58c174.7f1394cb\.obj\171ee6b10b19657f\app.cpp.obj E:\prj2010\test1\app1\app.cpp /TP
      E:\prj2010\test1\app1\app.cpp(8) : error C2065: 'compilation_error' : undeclared identifier

      defines and includes are duplicated.

      p.s.
      I ran into this when I had commandline-lenth issue on my linux box.
      Just for now i workarounded it with some Depends moving - from Export section to end application. It helps, but not at all.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            mapron Smirnov Vladimir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes