Commit ff766cd2 authored by Tom Finegan's avatar Tom Finegan

Make sure Python is present before pulling in gtest.

The CMake build of gtest requires python. Make sure it's
on the system, and disable tests when it's not. Also note
the Python requirement in the prereqs section of README.md.

BUG=aomedia:604

Change-Id: Iafe4891eca121eb57548e14b08477dc3c8a9c9df
parent a325233a
......@@ -10,6 +10,7 @@
4. For x86 targets, [yasm](http://yasm.tortall.net/), which is preferred, or a
recent version of [nasm](http://www.nasm.us/).
5. Building the documentation requires [doxygen](http://doxygen.org).
6. Building the unit tests requires [Python](https://www.python.org/).
### Basic build
......
......@@ -11,6 +11,7 @@
if (NOT AOM_TEST_TEST_CMAKE_)
set(AOM_TEST_TEST_CMAKE_ 1)
include(FindPythonInterp)
include(ProcessorCount)
include("${AOM_ROOT}/test/test_data_util.cmake")
......@@ -294,6 +295,12 @@ if (CONFIG_HIGHBITDEPTH)
endif ()
if (CONFIG_UNIT_TESTS)
find_package(PythonInterp)
if (NOT PYTHONINTERP_FOUND)
message(WARNING "--- Unit tests disabled: Python not found.")
set(CONFIG_UNIT_TESTS 0)
endif ()
if (MSVC)
# Force static run time to avoid collisions with googletest.
include("${AOM_ROOT}/build/cmake/msvc_runtime.cmake")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment