> 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?

But we speak about c/c++ :)

> What are pros?

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.

> For now you’re just saying that QBS behaves different from CMake.

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.


17.02.2019 0:32, Иван Комиссаров пишет:

16 февр. 2019 г., в 19:04, Denis Shienkov <[email protected] <mailto:[email protected]>> написал(а):


Why is it a very challenging task?

It is enough just to parse the QBS project, to take a compiler flags, architectures, defines and so on, and to create the MSVC project using that info. And then the Visual Studio will invoke all required stuff 'as usual' using own resources.


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?


Yes, of course, generating of the Qt-based project will cause some difficulties
(due to MOC and etc)... But for non-qt projects it should work.

PS: Besides, the Qt MSVC addon and the CMake solves it anyway... Why QBS can't? :)


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?


> 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.

I'm don't understand a bit, what do you mean here?

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=))

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! :)


It’s open source now. If personally you need this feature, contribute it.

BR,

Denis


16.02.2019 20:14, Иван Комиссаров пишет:
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.

16 февр. 2019 г., в 16:10, Denis Shienkov<[email protected]>  написал(а):

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
[email protected]
https://lists.qt-project.org/listinfo/qbs

_______________________________________________
Qbs mailing list
[email protected]
https://lists.qt-project.org/listinfo/qbs

Reply via email to