cmlib/CMLibDistCC.cmake

12 lines
397 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)
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()