View Issue Details

IDProjectCategoryView StatusLast Update
0013516ScribusBuild Systempublic2016-11-11 22:54
Reporterjlpoole Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
PlatformCMAKE 
Fixed in Version1.5.3.svn 
Summary0013516: Adding CCache to CMAKE
DescriptionWhen 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.
TagsNo tags attached.
PatchNo

Activities

jlpoole

2015-11-08 16:41

reporter  

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
ccache4CMakelists.diff (633 bytes)   

jghali

2015-11-08 17:59

administrator   ~0037324

Last edited: 2015-11-08 18:02

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.

Kunda

2015-11-09 09:40

updater   ~0037334

jghali, is there a way to tell ccache to rebuild automatically if said header files are altered ?

Kunda

2016-03-30 23:36

updater   ~0039597

Craig assigned this to himself. I wonder why?

Kunda

2016-11-11 21:02

updater   ~0042391

@cbradney any reason why you assigned this to yourself ?

cbradney

2016-11-11 22:15

administrator   ~0042393

Set WANT_CCACHE=1 on the CMake command line to enable

Kunda

2016-11-11 22:23

updater   ~0042395

craig applied patch and modification in r21505

Issue History

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