cmlib/CMLibDistCC.cmake

11 lines
390 B
CMake
Raw Normal View History

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)
2020-04-01 18:42:59 +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 "")
2019-08-08 08:10:36 +00:00
endif()
endforeach()
endif()