2019-08-08 08:10:36 +00:00
|
|
|
find_program(DISTCC_EXECUTABLE distcc)
|
|
|
|
mark_as_advanced(DISTCC_EXECUTABLE)
|
|
|
|
if(DISTCC_EXECUTABLE)
|
|
|
|
foreach(LANG C CXX)
|
2019-10-07 10:52:50 +00:00
|
|
|
if(NOT DEFINED CMAKE_${LANG}_COMPILER_LAUNCHER
|
|
|
|
AND NOT CMAKE_${LANG}_COMPILER MATCHES ".*/distcc$")
|
2019-08-08 08:10:36 +00:00
|
|
|
message(STATUS "Enabling distcc for ${LANG}")
|
|
|
|
set(CMAKE_${LANG}_COMPILER_LAUNCHER ${DISTCC_EXECUTABLE} CACHE STRING "")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|