[Qt-interest] call qmake from within c++

Nathan Carter nathancarter5 at gmail.com
Tue Mar 24 14:39:59 CET 2009


You can also call any command-line program with QProcess, if I'm not  
mistaken.

On Mar 20, 2009, at 5:24 PM, Clinton Stimpson wrote:

> Kurtis Nusbaum wrote:
>> I'm currently making a program that writes source code. I've
>> extensively used Qt in the source code that my program writes. I was
>> wondering if I might be able to get my program to run qmake so that  
>> my
>> program can compile the source code that it generates. Is there away
>> to do this directly in my source code? Or do I just have to develop a
>> different solution for all platforms involving their command lines?
>>
>> -Kurtis
>
> CTest (www.cmake.org) already does that work for you.
> "ctest --help" gives you the command line args to build code from the
> command line with make/nmake/Xcode/Visual Studio/etc... going on under
> the covers.
>
> I haven't tried, but maybe you could link the CTest library into your
> code, and call the library directly.
> You could still use it with qmake instead of cmake, as cmake is not
> required, but cmake generated files picked up by ctest would make it
> easier so you don't have to specify as many parameters.
> You should also be able to get back warnings and errors already  
> parsed,
> if you needed that.
>
> Clint
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list