project file with "subdirs" and different compilers
Hi all,
I have a .pro file with the TEMPLATE subdirs. Most of the project should compile with the compiler setup in the project environment.
But I have some subdirs that should compile with a specific (e.g. older) compiler version.
Is this possible within the .pro file or somehow in qtcreator? Because I can only use one "kit" for the whole project.
Otherwise I have to open those sub projects with an separate qtcreator.
Re: project file with "subdirs" and different compilers
You could try setting the QMAKE_CC and QMAKE_CXX variables inside the subdirectory's .pro file.
Cheers,
_
Re: project file with "subdirs" and different compilers
Thank you for the answer. Sorry for late response, didn't had time to test it.
Seems to work for the compiler. Can I also change the mkspec? It is set with -spec option for the whole projoct but if an other compiler is used another spec should be selected. Or do I have to overwrite all Options manually?
Re: project file with "subdirs" and different compilers
Hmm, good question.
You could try including the other mkspec, i.e. using the include() function.
Alternatively you could try removing the subdir from SUBDIRS and instead have a custom command that runs a different qmake on the subdir, or with different arguments.
Cheers,
_