Re: Compile *.c file as c++

RenĂ© Ferdinand Rivera Morell via Boost-build <[email protected]> Mon, 26 Jul 2021 08:21:32 -0500
Newsgroups gmane.comp.lib.boost.build
Message-ID <CAHEh_GiHoEJfFM4ajZ6Kfgw6LyOgoRa7JEn2geR8vW3w_ik+2w@mail.gmail.com>
--===============2476352115796186280==
Content-Type: multipart/alternative; boundary="000000000000627eb305c806a2ed"

--000000000000627eb305c806a2ed
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 26, 2021 at 7:44 AM Roman Matsybora <[email protected]> wrote:

> For example I have 100 *.c files.
> 50 of them have to compile as c++.
> Can it be solved without file renaming?
>

Ah, a different question than I thought. For B2 you can cast the source to
specific types of files. For example:

----
import cast ;
exe hello : [ cast _ cpp : a.c b.c ] ;
----

FYI.. B2 development and discussion moved to <
https://github.com/bfgroup/b2/discussions>.

--=20
-- Ren=C3=A9 Ferdinand Rivera Morell
-- Don't Assume Anything  -- No Supone Nada
-- Robot Dreams - http://robot-dreams.net

--000000000000627eb305c806a2ed
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Jul 26, 2021 at 7:44 AM Roman Mat=
sybora &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<=
br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div><span style=3D"display:block"><div><span style=3D"font-size=
:12pt;line-height:14pt;font-family:Arial">For example I have 100 *.c files.=
<br>50 of them have to compile as c++.<br>Can it be solved without file ren=
aming?</span></div></span></div></blockquote><div><br></div><div>Ah, a diff=
erent question than I thought. For B2 you can cast the source to specific t=
ypes of files. For example:</div><div><br></div><div>----<br></div><div>imp=
ort cast ;<br>exe hello : [ cast _ cpp : a.c b.c ] ;<br></div><div>----</di=
v><div><br></div><div>FYI.. B2 development and discussion moved to &lt;<a h=
ref=3D"https://github.com/bfgroup/b2/discussions">https://github.com/bfgrou=
p/b2/discussions</a>&gt;.</div></div><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr">-- Ren=C3=A9 Ferdina=
nd Rivera Morell<br>-- Don&#39;t Assume Anything=C2=A0 -- No Supone Nada<br=
>-- Robot Dreams -=C2=A0<a href=3D"http://robot-dreams.net/" target=3D"_bla=
nk">http://robot-dreams.net</a><br><br></div></div></div></div></div>

--000000000000627eb305c806a2ed--

--===============2476352115796186280==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build

--===============2476352115796186280==--