File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,21 @@ if(WITH_CCACHE)
8383 endif ()
8484endif (WITH_CCACHE)
8585
86+ option (WITH_SCCACHE "Build with sccache." )
87+ if (WITH_SCCACHE)
88+ if (CMAKE_C_COMPILER_LAUNCHER OR CMAKE_CXX_COMPILER_LAUNCHER)
89+ message (WARNING "Compiler launcher already set. stop configuring sccache" )
90+ else ()
91+ find_program (SCCACHE_EXECUTABLE sccache)
92+ if (NOT SCCACHE_EXECUTABLE)
93+ message (FATAL_ERROR "Can't find sccache. Is it installed?" )
94+ endif ()
95+ message (STATUS "Building with sccache: ${SCCACHE_EXECUTABLE} , SCCACHE_CONF=$ENV{SCCACHE_CONF} " )
96+ set (CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_EXECUTABLE} )
97+ set (CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_EXECUTABLE} )
98+ endif ()
99+ endif (WITH_SCCACHE)
100+
86101option (WITH_MANPAGE "Build man pages." ON )
87102if (WITH_MANPAGE)
88103 find_program (SPHINX_BUILD
Original file line number Diff line number Diff line change 5858
5959ARGS+=" -DWITH_PYTHON3=${PYBUILD} "
6060
61- if type ccache > /dev/null 2>&1 ; then
61+ if type sccache > /dev/null 2>&1 ; then
62+ echo " enabling sccache"
63+ ARGS+=" -DWITH_SCCACHE=ON"
64+ elif type ccache > /dev/null 2>&1 ; then
6265 echo " enabling ccache"
6366 ARGS+=" -DWITH_CCACHE=ON"
6467fi
You can’t perform that action at this time.
0 commit comments