Subject: CGAL users discussion list
List archive
- From: Mahmood NT <>
- To:
- Subject: Re: [cgal-discuss] reducing compile time
- Date: Tue, 27 Nov 2007 01:52:58 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=YYpMBDdOya+kky0VxjCJ50KGtWsIGM8ibAoYw5mlxRi5x+4nVqicWKdOgOPj3mpflF3r817y28IJFDoJ8NkeYt7MSK/afDMDHxXM/0X0nVOSTYX5sDX1ySLn0Zr822donIDUV+uo72GSyn30hzpd/GoJtWloweXDLDSMS+9lsSc=;
>It depends on the compiler, but for example with g++ you can use
>precompiled headers. In such a header, you can put as much stuff
>as you wish, especially template instantiations as Fernando mentioned,
>but already including many files can help. Then you precompile it,
>and the compiler loads the precompiled versions automatically
>if you specify something like "-include my_pch.h" on the command line.
>It has the benefit that you do not need to re-organize your source
>files (like concatenating all your *.cpp files before compiling them
>in one go instead of doing several compilations for each of them).
>precompiled headers. In such a header, you can put as much stuff
>as you wish, especially template instantiations as Fernando mentioned,
>but already including many files can help. Then you precompile it,
>and the compiler loads the precompiled versions automatically
>if you specify something like "-include my_pch.h" on the command line.
>It has the benefit that you do not need to re-organize your source
>files (like concatenating all your *.cpp files before compiling them
>in one go instead of doing several compilations for each of them).
I have the same problem with compilation time with gcc.
Can you explain more about how to create and use precompiled header. any link, webpage,...
what should I do with makefile?
----- Original Message ----
From: Sylvain Pion <>
To:
Sent: Thursday, November 22, 2007 10:23:32 PM
Subject: Re: [cgal-discuss] reducing compile time
Gabriel Cirio a écrit :
> Hello,
>
> is there any tip or trick to reduce the compile time of a CGAL
> application? I am using an enriched polyhedron template with a bunch of
> templated (since they use the enriched polyhedron) functionalities, and
> it often takes several minutes to compile since every single
> header/template is recompiled each time. Is there a technique to
> minimize template recompilation?
It depends on the compiler, but for example with g++ you can use
precompiled headers. In such a header, you can put as much stuff
as you wish, especially template instantiations as Fernando mentioned,
but already including many files can help. Then you precompile it,
and the compiler loads the precompiled versions automatically
if you specify something like "-include my_pch.h" on the command line.
It has the benefit that you do not need to re-organize your source
files (like concatenating all your *.cpp files before compiling them
in one go instead of doing several compilations for each of them).
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
From: Sylvain Pion <>
To:
Sent: Thursday, November 22, 2007 10:23:32 PM
Subject: Re: [cgal-discuss] reducing compile time
Gabriel Cirio a écrit :
> Hello,
>
> is there any tip or trick to reduce the compile time of a CGAL
> application? I am using an enriched polyhedron template with a bunch of
> templated (since they use the enriched polyhedron) functionalities, and
> it often takes several minutes to compile since every single
> header/template is recompiled each time. Is there a technique to
> minimize template recompilation?
It depends on the compiler, but for example with g++ you can use
precompiled headers. In such a header, you can put as much stuff
as you wish, especially template instantiations as Fernando mentioned,
but already including many files can help. Then you precompile it,
and the compiler loads the precompiled versions automatically
if you specify something like "-include my_pch.h" on the command line.
It has the benefit that you do not need to re-organize your source
files (like concatenating all your *.cpp files before compiling them
in one go instead of doing several compilations for each of them).
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
Get easy, one-click access to your favorites. Make Yahoo! your homepage.
- Re: [cgal-discuss] reducing compile time, Mahmood NT, 11/27/2007
- Re: [cgal-discuss] reducing compile time, Andreas Fabri, 11/27/2007
- <Possible follow-up(s)>
- Re: [cgal-discuss] reducing compile time, Mahmood NT, 11/27/2007
- Re: [cgal-discuss] reducing compile time, Andreas Meyer, 11/27/2007
Archive powered by MHonArc 2.6.16.