Have not used precompiled headers with gcc, but I do get great results
using ccache and -j JOBS=NCPU in gmake with any project. Something like
10% to 20% of original time to compile after caching is pretty typically.
Jason
On 10/8/2010 4:39 AM, Jeffrey Walton wrote:
The feature works much better with:
CXXFLAGS = -DNDEBUG -g -O2 -DUSE_PRECOMPILED_HEADERS=1
I also added<string>,<algorithm>, and<memory> to the list in pch.h.
Using precompiled headers on a particular Core 2 Duo (circa mid-2008)
reduced compile times by 38% (3 min, 51 sec versus 2 min, 22 sec).
Jeff
On Oct 7, 5:01 pm, Jeffrey Walton<[email protected]> wrote:
Hi All,
Does anyone have any experience with Linux/GCC precompiled headers? I
found no difference (makefile mods attached) - each took exactly 2:11
(m:s).
Any ideas? Or is this a GCC rabbit hole?
Jeff
jeff...@bruno:~/cryptopp$ cat GNUmakefile.diff
Index: GNUmakefile
===================================================================
--- GNUmakefile (revision 521)
+++ GNUmakefile (working copy)
@@ -131,9 +131,12 @@
TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
DLLTESTOBJS = dlltest.dllonly.o
-all: cryptest.exe
+all: precompile cryptest.exe
-test: cryptest.exe
+precompile: pch.h
+ $(CXX) $(CXXFLAGS) pch.h -o pch.h.gch
+
+test: precompile cryptest.exe
./cryptest.exe v
clean:
@@ -153,7 +156,7 @@
libcryptopp.so: $(LIBOBJS)
$(CXX) -shared -o $@ $(LIBOBJS)
-cryptest.exe: libcryptopp.a $(TESTOBJS)
+cryptest.exe: precompile libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS)
$(LDLIBS)
nolib: $(OBJS) # makes it faster to test changes
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.