2019-08-08 08:10:36 +00:00
|
|
|
find_program(DISTCC_EXECUTABLE distcc)
|
|
|
|
mark_as_advanced(DISTCC_EXECUTABLE)
|
|
|
|
if(DISTCC_EXECUTABLE)
|
2021-06-12 09:59:31 +00:00
|
|
|
foreach(lang C CXX)
|
|
|
|
if(NOT DEFINED CMAKE_${lang}_COMPILER_LAUNCHER AND NOT CMAKE_${lang}_COMPILER MATCHES ".*/distcc$")
|
|
|
|
message(STATUS "Enabling distcc for ${lang}")
|
|
|
|
set(CMAKE_${lang}_COMPILER_LAUNCHER ${DISTCC_EXECUTABLE} CACHE STRING "")
|
2019-08-08 08:10:36 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|