English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamlbuild myocamlbuild question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-25 (20:50)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] ocamlbuild myocamlbuild question
On 3/25/07, Christian Sternagel <christian.sternagel@uibk.ac.at> wrote:
> is it possible to give something like
> flag ["c"; "~<file:*_stubs.c>"] (S [A "-cc"; A "g++"])
> to set the -cc g++ switch for all *.c files except ocaml-stub files. I know, that the above code wouldn't work, but is there a way to do such things?

Nop, but you can easily do it by declaring a tag:

$ cat _tags
not <*_stubs.c>: use_gxx

And in your myocamlbuild.ml

flag ["c"; "use_gxx"] (S [A "-cc"; A "g++"])

Nicolas Pouillard