Commit 4ceee161 authored by Johann's avatar Johann Committed by Johann Koenig

cmake flag for disabling adopted experiments

Match configure behavior. Use with:
-DENABLE_ADOPTED_EXPERIMENTS=OFF

Change-Id: I5402d5b0ca65cf3013744ca28023118b7508fd2a
parent 7d701684
......@@ -17,6 +17,7 @@ if (NOT EMSCRIPTEN)
endif ()
endif ()
option(ENABLE_ADOPTED_EXPERIMENTS "Enable adopted experiments." ON)
option(ENABLE_CCACHE "Enable ccache support." OFF)
option(ENABLE_DISTCC "Enable distcc support." OFF)
option(ENABLE_DOCS "Enable documentation generation (doxygen required)." ON)
......
......@@ -47,6 +47,24 @@ foreach (var ${cmake_cache_vars})
endif ()
endforeach ()
# Adopted experiments get enabled by default. For debugging, make it possible to
# to turn them all off with a single option.
if (NOT ENABLE_ADOPTED_EXPERIMENTS)
get_cmake_property(cmake_cache_vars CACHE_VARIABLES)
unset(var)
foreach (var ${cmake_cache_vars})
unset(var_helpstring)
get_property(var_helpstring CACHE ${var} PROPERTY HELPSTRING)
if ("${var_helpstring}" STREQUAL "AV1 experiment flag.")
if ("${var}" STREQUAL "CONFIG_CB4X4")
# CB4X4 is required and can not be disabled.
else ()
set(${var} 0)
endif ()
endif ()
endforeach ()
endif ()
# Detect target CPU.
if (NOT AOM_TARGET_CPU)
if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR
......
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