[Qt-creator] How to show sources in the project tree that are not compiled by gcc.

kai.koehne at nokia.com kai.koehne at nokia.com
Fri Apr 27 10:48:50 CEST 2012



> -----Original Message-----
> From: qt-creator-bounces+kai.koehne=nokia.com at qt-project.org [mailto:qt-
> creator-bounces+kai.koehne=nokia.com at qt-project.org] On Behalf Of ext
> Paulo Silva
> Sent: Friday, April 27, 2012 10:40 AM
> To: qt-creator at qt-project.org
> Subject: [Qt-creator] How to show sources in the project tree that are not
> compiled by gcc.
> 
> Hi,
> 
> I'm building a cuda application on QtC, and I got to this point that I have two
> types of sources.
> One, the normal c/c++ sources, and another the cuda sources.
> 
> Like discussed here http://forums.nvidia.com/index.php?showtopic=29539
> 
> in my project file I have:
> 
> CUDA_SOURCES += ../src/*.cu
> SOURCES += ../src/*.cpp
> (...)
> cuda.input = CUDA_SOURCES
> (...)
> QMAKE_EXTRA_COMPILERS += cuda
> 
> Now, I would like to have my CUDA_SOURCES listed in the project tree.
> However if I add them to the SOURCES then gcc will try to compile them
> - and we don't want that, because nvcc will take care of that.
> Is there another way of making them show up on the tree?

Hi,

You can add them to the OTHER_FILES variable. Qmake doesn't know about it, and completely ignores it, but Qt Creator will show the files in the project tree then.

E.g. try adding

OTHER_FILES += $$CUDA_SOURCES

Regards

Kai

> My issue is exactly the same as asked here:
> http://qt-project.org/forums/viewthread/3105
> But the answer is not helpful, as it does not relate to how to get the source
> listed on the QtCreator project tree.
> 
> Thank you
> Paulo
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator



More information about the Qt-creator mailing list