Re: [eigen] on CoreDeclarations |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: "Benoît Jacob" <jacob@xxxxxxxxxxxxxxx>
- Subject: Re: [eigen] on CoreDeclarations
- From: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 28 Aug 2008 15:28:30 +0200
- Cc: eigen@xxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=a6y8EruVw91Sb35qqNbkvYwmmrPu/lAyDDThDQ9sVeo=; b=GHQxXrZOEoiXrj762tYMo7xBrLIWi+mtohifIDQ+io6IFiy+qR4hVbSeYiLCRZh59Y Ap4XVcKuiCNYzMicZ0BRGY/kvXcf4a5A80g+fFeAeV5o6ASzW+MJE4lsd9Wjmhr7lxZl 4QqQ/j8i9ENEw576qgkenKsszMauFxQuTcRvU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hSLHS8sWj4ltDaH/PJ/m80VFOOqVSaMbYR9dCAXwGkfMN6fZeueXbpnlNBzfB2/tS4 +8cK3iQAfV8VpojueIEbGB0hLbvBiCnZHgUxXzbfiogZJGyiM1xi3PbU2WOaNvI2przF YbZQJxpLKrLpWV1QcLX5RGILF0cpRz5sgMxMs=
On Thu, Aug 28, 2008 at 3:09 PM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote:
>
> Do you know if g++ has the precompiled-headers feature? Is that easy to use in
> the context of a cmake/make/g++ project?
that's easy, create a file (with the .h extension, mandatory):
MyPCH.h
#include <Eigen/Core>
#include <another_stable_header_used_everywhere_in_my_project>
....
g++ -c CXXFLAGS path/to/MyPCH.h
at this point when gcc see : #include "MyPCH.h" it will use the
respective precompiled header file (the optimization/debug flags
*must* be the same)
So in practice you have to include the file MyPCH.h *before* the other
headers (gcc has also an option to specify additional files to
include)
you can have only one precompiled header file.
I managed to use PCH with cmake/g++ on my project, so that's doable !!
(I found some helper cmake module for that, but maybe cmake 2.6 has
some more builtin and cleaner support...)
gael.