cmlib/CMLibDistCC.cmake

14 lines
465 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)
2019-12-03 16:23:14 +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}")
2019-12-03 16:23:14 +00:00
set(CMAKE_${LANG}_COMPILER_LAUNCHER
${DISTCC_EXECUTABLE}
CACHE STRING "")
2019-08-08 08:10:36 +00:00
endif()
endforeach()
endif()