User forums > Help
ccache to speed up builds
reckless:
unfortunatly not atleast untill some adds the option to codeblocks :/ using a batch file as a wrapper causes codeblocks to spit out invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] errors but i suspect you could do it from inside the project properties by defining CC=ccache gcc to the preprocessor variables. same goes for g++ ;)
ollydbg:
Sorry, I'm still confused.
As you said:
--- Quote ---i suspect you could do it from inside the project properties by defining CC=ccache gcc to the preprocessor variables. same goes for g++
--- End quote ---
So, what's the exact steps I should do?
1, I just copy ccache.exe to the mingw/bin
2, I create a console project by Codeblocks' project wizard.
3, then, what should I do? Do I need to do some hack on the project build options?? or other modifications on project properties??? I have just add a Custom variables : CC = "ccache gcc", but it does Noting...
reckless:
pretty much ;) its not visible but try a larger project and notice the compile times if it works it should compile quite a lot faster :)
a way to check if its working is to show hidden files in explorer then navigate to user\your name\AppData\Roaming And look for a folder named .ccache if its there it works :).
a god project to try it out on could be codeblocks itself because of its size you should notice some better compile times. codeblocks is c++ though so the variable would be CXX="ccache g++".
ollydbg:
I just change the Menu-settings-compiler and debugger-Tool chain executes -
I change the
C++ compiler from
--- Quote ---mingw32-g++.exe
--- End quote ---
to
--- Quote ---ccache.exe mingw32-g++.exe
--- End quote ---
But still can't get things to work.
With the ccache.exe from your ftp site ftp://90.184.233.166:21/ccache.exe
It works!!
Here is the build log:
--- Quote ----------------- Build: Debug in test_cc_cache ---------------
[ 50.0%] ccache mingw32-g++.exe -Wall -fexceptions -g -c C:\codeblocks_test_code\test_cc_cache\main.cpp -o obj\Debug\main.o
[100.0%] mingw32-g++.exe -o bin\Debug\test_cc_cache.exe obj\Debug\main.o
Output size is 1.01 MB
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
--- End quote ---
with the ccache.exe from another link: http://ramiro.arrozcru.org/ ccache-win32-1.exe
I get the error log below:
--- Quote ----------------- Build: Debug in test_cc_cache ---------------
[ 50.0%] ccache.exe mingw32-g++.exe -Wall -fexceptions -g -c C:\codeblocks_test_code\test_cc_cache\main.cpp -o obj\Debug\main.o
ccache: FATAL: Unable to determine cache directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
--- End quote ---
:(
reckless:
yep thats the error i got if i use it in the compiler properties.
just made a test and it works ok if done like in the image.
Uploaded with ImageShack.us
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version