View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013516 | Scribus | Build System | public | 2015-11-08 16:41 | 2016-11-11 22:54 |
Reporter | jlpoole | Assigned To | cbradney | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | CMAKE | ||||
Fixed in Version | 1.5.3.svn | ||||
Summary | 0013516: Adding CCache to CMAKE | ||||
Description | When trying to make a change in a C++ file, the compile time can be daunting, on my laptop running Gentoo Linux it can take 40 minutes. To speed things along, having a cache of already built object can be accomplished with CCACHE (https://ccache.samba.org/). Using CCACHE save a great deal of time when tweaking C++ files and the having to build everything for testing. I am submitting a diff file, ccache3CMakelists.diff, with modifies CMakeLists.txt This could be helpful to others wanting to make contributions to this code line. | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
ccache4CMakelists.diff (633 bytes)
Index: Scribus/CMakeLists.txt =================================================================== --- Scribus/CMakeLists.txt (revision 20539) +++ Scribus/CMakeLists.txt (working copy) @@ -6,6 +6,14 @@ #Require 3.2.0 for add_custom_target with byproducts CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9 FATAL_ERROR) +# Configure CCache if available +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +endif(CCACHE_FOUND) + + #Pretty colors SET(CMAKE_COLOR_MAKEFILE ON) #Don't force verbose |
|
Some headers are known to cause a full (or almost) recompile. Amongst them are pageitem.h, scribus.h and scribusview.h. CCache will not help there: if it prevents some files to be recompiled, the resulting binaries will be broken. When doing out of source builds, cmake does already a decent job tracking file dependencies and rebuilds only what is necessary. |
|
jghali, is there a way to tell ccache to rebuild automatically if said header files are altered ? |
|
Craig assigned this to himself. I wonder why? |
|
@cbradney any reason why you assigned this to yourself ? |
|
Set WANT_CCACHE=1 on the CMake command line to enable |
|
craig applied patch and modification in r21505 |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-11-08 16:41 | jlpoole | New Issue | |
2015-11-08 16:41 | jlpoole | File Added: ccache4CMakelists.diff | |
2015-11-08 17:59 | jghali | Note Added: 0037324 | |
2015-11-08 18:00 | jghali | Note Edited: 0037324 | |
2015-11-08 18:02 | jghali | Note Edited: 0037324 | |
2015-11-08 21:17 | cbradney | Assigned To | => cbradney |
2015-11-08 21:17 | cbradney | Status | new => assigned |
2015-11-09 09:40 | Kunda | Note Added: 0037334 | |
2016-03-30 23:36 | Kunda | Note Added: 0039597 | |
2016-11-11 21:02 | Kunda | Note Added: 0042391 | |
2016-11-11 22:15 | cbradney | Status | assigned => resolved |
2016-11-11 22:15 | cbradney | Resolution | open => fixed |
2016-11-11 22:15 | cbradney | Fixed in Version | => 1.5.3.svn |
2016-11-11 22:15 | cbradney | Note Added: 0042393 | |
2016-11-11 22:23 | Kunda | Note Added: 0042395 | |
2016-11-11 22:54 | cbradney | Status | resolved => closed |