<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="-1">>  </font><font size="-1">For c++ - yes.
        Imagine a pure javascript rule that doesn’t invoke any
        «compiler» (like cl or javac) but converts some input to output
        using qbs itself. How that custom rule would like?</font></p>
    <p>But we speak about c/c++ :)</p>
    <p>> What are pros?</p>
    <p>Pros are than I can use then a generated 'native' project on
      hosts without of QBS (just use that 'native' IDE &&
      tools)!  F.e. using a 'native' debugger and etc.</p>
    <p>> For now you’re just saying that QBS behaves different from
      CMake.</p>
    <p>Nono. I say that QBS's generator behavios is strange for me.
      Because I expect that it will generate a 'native' project for a
      target tool.</p>
    <br>
    <div class="moz-cite-prefix">17.02.2019 0:32, Иван Комиссаров пишет:<br>
    </div>
    <blockquote type="cite"
      cite="mid:E9A65FF5-0A7F-4A49-8A39-F37AE338F214@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">16 февр. 2019 г., в 19:04, Denis Shienkov <<a
              href="mailto:denis.shienkov@gmail.com" class=""
              moz-do-not-send="true">denis.shienkov@gmail.com</a>>
            написал(а):</div>
          <div class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class=""> <br class="">
                Why is it a very challenging task?<br class="">
                <br class="">
                It is enough just to parse the QBS project, to take a
                compiler flags, architectures,<br class="">
                defines and so on, and to create the MSVC project using
                that info. And then the <br class="">
                Visual Studio will invoke all required stuff 'as usual'
                using own resources.<br class="">
              </p>
            </div>
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>For c++ - yes. Imagine a pure javascript rule that doesn’t
          invoke any «compiler» (like cl or javac) but converts some
          input to output using qbs itself. How that custom rule would
          like?</div>
        <div><br class="">
        </div>
        <blockquote type="cite" class="">
          <div class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class=""> <br class="">
                Yes, of course, generating of the Qt-based project will
                cause some difficulties<br class="">
                (due to MOC and etc)... But for non-qt projects it
                should work. <br class="">
                <br class="">
                PS: Besides, the Qt MSVC addon and the CMake solves it
                anyway... Why QBS can't? :)<br class="">
              </p>
            </div>
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>It can. But when choosing 2 ways of doing same thing, you
          write down pros and cons and compare those ways. The cons are
          - it’s harder to implement the proper generator than the fake
          one (simply because «proper generator» will include the «fake»
          one for the case I mentioned above). What are pros?</div>
        <blockquote type="cite" class="">
          <div class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class=""> <br class="">
                > What’s the point of implementing a rule for cpp
                files directly in the solution and not implementing it
                for other cases? I don’t see any use cases.<br class="">
                <br class="">
                I'm don't understand a bit, what do you mean here?<br
                  class="">
              </p>
            </div>
          </div>
        </blockquote>
        <div>What I am trying to tell is that current approach may not
          be perfect, but it works. Unless you can say what’s wrong with
          it. You need to describe what’s wrong and prove that it can’t
          be fixed due to the chosen approach. For now you’re just
          saying that QBS behaves different from CMake. Well, this is
          not a new information=))</div>
        <br class="">
        <blockquote type="cite" class="">
          <div class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class="">UPD: I'm ask all this question, because I'm
                doubt: is it makes sense tries to implement the
                generators (to spent a time) for a "bare-metal" stuff...
                e.g. to generate the projects for IAR, Keil, Atmel
                Studio and etc? Or QBS is dead, and we need to make
                tries to use CMake for that cases (but I'm don't know
                and don't like CMake)? It is a main dilemma! :)<span
                  class=" tlid-translation translation"><span title=""
                    class=""><br class="">
                  </span></span></p>
            </div>
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>It’s open source now. If personally you need this feature,
          contribute it.</div>
        <br class="">
        <blockquote type="cite" class="">
          <div class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class=""><span class=" tlid-translation translation"><span
                    title="" class=""> </span></span></p>
              <p class="">BR, <br class="">
              </p>
              <p class="">Denis<br class="">
              </p>
              <p class=""><br class="">
              </p>
              <div class="moz-cite-prefix">16.02.2019 20:14, Иван
                Комиссаров пишет:<br class="">
              </div>
              <blockquote type="cite"
                cite="mid:27E20702-32D5-4C56-AF40-E501761789C9@gmail.com"
                class="">
                <pre class="moz-quote-pre" wrap="">I can comment. If you want a real generator, you should use cmake=)

Being serious, it is not a recursion, it is a proxy - solution is the proxy for the IDE to call the build tool (which is QBS).
Creating a «proper» solution that invokes compilers directly is a very challenging task… Imagine you have a custom (not the *.cpp -> *.o) rule for generating some files with a bunch of JS code. How are you going to invoke this code? Well, you probably would like to call QBS… But if you’re calling it for *some* cases why not call it in *all* cases and save some time?

What’s the point of implementing a rule for cpp files directly in the solution and not implementing it for other cases? I don’t see any use cases.

</pre>
                <blockquote type="cite" class="">
                  <pre class="moz-quote-pre" wrap="">16 февр. 2019 г., в 16:10, Denis Shienkov <a class="moz-txt-link-rfc2396E" href="mailto:denis.shienkov@gmail.com" moz-do-not-send="true"><denis.shienkov@gmail.com></a> написал(а):

Hi all,

It was surprised for me, that a generated MSVC solution file has
a build commands which are calls the QBS to build the generated
MSVC solution... It is recursion!!! o_O

WTF? But it has not a sense!

If I want to build a project using the QBS, then I know that I
will use the QBS!

But when I want to generate the MSVC project, then I will expect
that the QBS will generate the 'native' MSVC solution, which I
will use in the Visual Studio IDE on a host without of the QBS!

Any comments?

BR,
Denis

_______________________________________________
Qbs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qbs@qt-project.org" moz-do-not-send="true">Qbs@qt-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.qt-project.org/listinfo/qbs" moz-do-not-send="true">https://lists.qt-project.org/listinfo/qbs</a>
</pre>
                </blockquote>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
  </body>
</html>