[Qbs] Unexpected behavior of MSVC generator

Denis Shienkov denis.shienkov at gmail.com
Sat Feb 16 19:04:04 CET 2019


 > If you want a real generator, you should use cmake=)

Yes, I know. It's funny and sad at the same time, that CMake does 
support that feature, but QBS does not. :)

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

IMHO, this 'feature' has not sense from the beginning, and whole time
which is spent to develop of this  'feature' was wasted to /dev/null.

 > Creating a «proper» solution that invokes compilers directly is a 
very challenging task…

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.

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

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

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

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 <denis.shienkov at gmail.com> написал(а):
>>
>> 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
>> Qbs at qt-project.org
>> https://lists.qt-project.org/listinfo/qbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20190216/b6aeb11c/attachment.html>


More information about the Qbs mailing list