File tree 4 files changed +23
-0
lines changed
4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ if(BUILD_RESOURCES)
31
31
set (BUILD_RESOURCES true )
32
32
endif ()
33
33
34
+ if (ENABLE_CCACHE)
35
+ include (cmake/ccache.cmake)
36
+ endif ()
37
+
34
38
set (TARGET_DEVICE "PINETIME" CACHE STRING "Target device" )
35
39
set_property (CACHE TARGET_DEVICE PROPERTY STRINGS PINETIME MOY_TFK5 MOY_TIN5 MOY_TON5 MOY_UNK)
36
40
Original file line number Diff line number Diff line change 31
31
"TARGET_DEVICE" : {
32
32
"type" : " STRING" ,
33
33
"value" : " PINETIME"
34
+ },
35
+ "ENABLE_CCACHE" : {
36
+ "type" : " BOOL" ,
37
+ "value" : true
34
38
}
35
39
}
36
40
},
Original file line number Diff line number Diff line change
1
+ find_program (CCACHE_EXECUTABLE ccache)
2
+
3
+ if (CCACHE_EXECUTABLE)
4
+ message (STATUS "Activating ccache compiler cache." )
5
+ set (ccacheEnv
6
+ CCACHE_SLOPPINESS=pch_defines
7
+ )
8
+ foreach (lang IN ITEMS C CXX)
9
+ set (CMAKE_${lang} _COMPILER_LAUNCHER
10
+ ${CMAKE_COMMAND} -E env ${ccacheEnv} ${CCACHE_EXECUTABLE}
11
+ )
12
+ endforeach ()
13
+ message (WARNING "Ccache could not be activated because ccache executable was not found." )
14
+ endif ()
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ RUN apt-get update -qq \
12
12
# x86_64 / generic packages
13
13
bash \
14
14
build-essential \
15
+ ccache \
15
16
cmake \
16
17
git \
17
18
make \
You can’t perform that action at this time.
0 commit comments