On 7 May 2011 19:56, Eugenio Rustico jfrusciante@tiscali.it wrote:
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.
Yes, they are called "independent commands" because they are independent of the filetype :-)
So they are stored in the user preferences, not in any filetype file.
These three commands are not normally compile commands, they normally default to being called "Make", "Make Custom target" and "Make object" and by default they run make not a compile command. That is why they are independent of the filetype, because make uses the makefile and doesn't care about the types of the source files.
Are you using a translated version, maybe there is an error or misunderstanding in the translation that makes it read "compile object"?
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?
The settings in the [build settings] group applied to pre- 0.19 Geany and set the commands for the three filetype commands. With Geany 0.19 and later these are only loaded if no [build_menu] commands exist. This meant that all the filetype files didn't need to be re-written all at once, and in fact very few have been done yet. But as I said before mixing the two groups in the same file may not work well.
No commands set in the filetype files in either [build_settings] or [build_menu] affect the filetype independent commands.
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)?
By default the compile command is the first filetype command, which is what you have defined with the [build_menu] settings saved above. In the C filetype that is also the case even though the system filetype.c uses the old [build_settings], so the shortcut will be the same, by default F8.
Cheers Lex