[Geany] Specified compiler in custom filetype doesn't work

Eugenio Rustico jfrusciante at xxxxx
Sat May 7 09:56:14 UTC 2011


I removed the [build_settings] and [build-menu] sections in
$HOME/.config/geany/filedefs/filetypes.CUDA.conf; then I open geany
with

    geany tex.cu

and in "Set build commands" dialog I set a new one in "CUDA file
commands" section (nvcc -o "%e.o" %f). This makes the trick, i.e.
after closing geany there is a new section in my filetype:

    [build-menu]
    FT_00_LB=Compila con nvcc
    FT_00_CM=nvcc -o "%e.o" %f
    FT_00_WD=

However, if I change the default "compile object" command, in
"Independent Commands" section, this setting is not written to the
config file and, above all, it seems to be a global setting (i.e. if I
open a normal .cc file afterwards, the setting remains "nvcc", while
it should be g++ again). I guess this is the right behaviour in
design.

So, there is no way to change the default compile command (to have the
same shortcut) only for a specific filetype? Wasn't the "compiler"
option in the filetype definition meant for this?

Same question in a different way: I have to redistribute my filetype
definition. Can i set somewhere that I want to compile any .cu file
with nvcc without creating an additional voice in build menu (so that,
for example, the compile object shortcut is the same for .cc and .cu
files)?


  Cheers
  Eugenio R.

2011/5/7 Lex Trotman <elextr at gmail.com>:
> On 7 May 2011 09:40, Eugenio Rustico <jfrusciante at tiscali.it> wrote:
>> 2011/5/7 Lex Trotman <elextr at gmail.com>:
>>>>
>>>> In the build menu I see: make, compile custom target, compile (there
>>>> is no "build" item); all these three launch a "make" command.
>>>
>>> So why do you think that the [build_menu ] settings worked if it isn't
>>> in the menu?
>>
>> Above the standards, I see "nvcc" voice, working (it executes nvcc as
>> I specified in the config). I was listing the "standard" build
>> commends. After those, there are "next error", "prev error", "execute"
>> and so on.
>>
>> Which voice is supposed to execute the commands specified in
>> [build_settings]? "Compile" (that insteads calls a make) and "Build"
>> (but I see no build voice when a .cu file is loaded)?
>>
>
> Basically you shouldn't mix the two sets of build settings.  Geany
> will try to combine them in a sensible manner, but as their semantics
> differ, it doesn't always work.
>
> You should define all your menu and the commands using [build_menu].
> The cheats method is to remove all build settings from your cu
> filetype file load a cu file in Geany then define the menu in the Set
> build Commands dialog, close Geany (unless you are using the *very*
> latest SVN) and the settings will be written to your user cu filetype
> file.
>
> As to why your make object menu item has changed name to compile, see
> if it has been edited in the set build commands dialog (click on clear
> to return to the default).
>
> Cheers
> Lex
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>



More information about the Users mailing list