Add goma distributed compiler support to CMake build.
Change-Id: I79f908264d0f5562931e757db36410410f3a03e3
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e56a17e..4c2ec46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@
option(ENABLE_CCACHE "Enable ccache support." OFF)
option(ENABLE_DISTCC "Enable distcc support." OFF)
option(ENABLE_DOCS "Enable documentation generation (doxygen required)." ON)
+option(ENABLE_GOMA "Enable goma support." OFF)
option(ENABLE_NASM "Use nasm instead of yasm for x86 assembly." OFF)
option(ENABLE_IDE_TEST_HOSTING
"Enables running tests within IDEs like Visual Studio and Xcode." OFF)
diff --git a/build/cmake/aom_configure.cmake b/build/cmake/aom_configure.cmake
index 72135bc..f306c8c 100644
--- a/build/cmake/aom_configure.cmake
+++ b/build/cmake/aom_configure.cmake
@@ -168,6 +168,16 @@
endif ()
endif ()
+if (ENABLE_GOMA)
+ find_program(GOMACC "gomacc")
+ if (NOT "${GOMACC}" STREQUAL "")
+ set(CMAKE_C_COMPILER_LAUNCHER "${GOMACC}")
+ set(CMAKE_CXX_COMPILER_LAUNCHER "${GOMACC}")
+ else ()
+ message("--- Cannot find gomacc, ENABLE_GOMA ignored.")
+ endif ()
+endif ()
+
if (NOT CONFIG_AV1_DECODER AND NOT CONFIG_AV1_ENCODER)
message(FATAL_ERROR "Decoder and encoder disabled, nothing to build.")
endif ()