set(DCHECK_IS_CONFIGURABLE OFF)

if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR DCHECK_IS_CONFIGURABLE)
  set(DCHECK_ALWAYS_ON ON)
else()
  set(DCHECK_ALWAYS_ON OFF)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR DCHECK_ALWAYS_ON)
  set(ENABLE_EXPENSIVE_DCHECKS ON)
else()
  set(ENABLE_EXPENSIVE_DCHECKS OFF)
endif()
