Page 1 of 1
Use nvcc compiler
Posted: Thu Oct 11, 2018 1:55 am
by Ivans
How can I define that some files must be compiled by nvidia nvcc compiler and not by gcc or clang?
Re: Use nvcc compiler
Posted: Thu Oct 11, 2018 12:49 pm
by eranif
You can not change the compiler per file.
You can however, set a new compile line for files with a unique extension.
For example, CodeLite is building .rc files using the resource compiler
This is configurable and can be changed from: settings->build settings->compilers->YOUR COMPILER->Files type tab
Re: Use nvcc compiler
Posted: Mon Oct 15, 2018 4:46 pm
by Ivans
Yes,
But there is a compiler type definition in project's settings. So even if I have added 'nvc'c as an additional compiler into codelite global settings, will it use nvcc if it sees *.cu files but project settings says use GCC compiler?
Re: Use nvcc compiler
Posted: Thu Oct 18, 2018 11:15 pm
by eranif
The name is just a symbolic tool. You can define a tool per *file* type. i.e, the sane "compiler" can be used different tools to compile different file types
Re: Use nvcc compiler
Posted: Fri Oct 19, 2018 2:54 am
by Gibbon1
I saw this thread, was wondering currently the codelite supports a debug and release build. Would be possible to extend this to re-targeting to a different compiler? Because you can include and exclude files based on debug and release. So instead of build debug/release, you could have build gcc, build nvcc etc.
The other way to handle this is to create separate projects under the same workspace. This is how one of my projects is set up since I'm using a common code base to build firmware for several different board. My projects each have a build directory with a project file and local configuration files. And you can also use the include directory list to select project specific headers.